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