OAuth2 token does not have write priviledge
Summary
We are trying to push changes to to repo by using OAuth2 tokens. However the token cannot be used to push tags or code change commits.
Is it a feature or a bug?
Steps to reproduce
OAuth2 token is totally working to fetch repo:
$ git fetch
Username for 'https://gitlab.com': oauth2
Password for 'https://oauth2@gitlab.com': (input token here)
$ echo $?
0
However, when we run a git push using the same token:
git push
Username for 'https://gitlab.com': oauth2
Password for 'https://oauth2@gitlab.com': (input token here)
The return result shows:
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://gitlab.com/project/blah.git/'
with a return code of 128
.