You must use a personal access token with 'read_repository' or 'write_repository' scope for Git over HTTP code example
Example: you must use a personal access token with 'read_repository'
[remote "origin"]
url = https://oauth2:[email protected]/yourself/yourproject.git