Reputation: 7076
When I run : git push
, there is exist error like this :
remote: Access denied
fatal: unable to access 'https://gitlab.com/myname/mysystem.git/': The requested URL returned error: 403
Is there any people who can help me?
Upvotes: 27
Views: 100794
Reputation: 11
check how to generate new password and try below
you can type in cmd
Username for 'https://gitlab.XXX.xx': XXXX Password for 'https://[email protected]': here u can enter new token or try this one also
Upvotes: 1
Reputation: 161
For anyone who is getting this error also on non-Windows platforms with GitLab 13+. There is another reason for this error apart from invalid credentials in your credential manager.
I had a problem where my account was using LDAP for authentication but still had a password expiration date set. Because the server was configured to use LDAP authentication only, the password expiration was not visible in the web UI and became only an issue after GitLab published a security fix with version 13.12.2.
You can check and edit the password_expires_at
attribute of a user account via the GitLab Rails Console. Setting it to nil
solved the issue for me and got the LDAP authentication working again.
Upvotes: 0
Reputation: 51
Basic Authentication / Access Denied issue fix:
Open Terminal from respect tool (Ex: Source Tree)
Execute this command --> git config --global credential.helper store
Execute this command --> git pull
i) provide your user name 2) provide your password
Upvotes: 5
Reputation: 1033
This happened to me today.
First was a blue screen of death in Windows 10 (I'm using git for windows connecting to a Azure DevOps repo), so after a restart, I was able to run git status
and git diff
both were fine, and then git add .
that was also fine. When I got to git push
I got an error unable to access.
I had cloned the repo and used the supplied git credentials initially and didn't have to enter any more credentials. So, I tried git remote -v
and it listed the remote repo. After this I tried git push
again, and It worked. An easy one to try before you go more difficult routes.
Upvotes: 0
Reputation: 11244
For Windows User
Go to Control Panel->Credential Manager->Windows Credentials select github or gitlab credentials and modify it. This is for windows10
Update your credentials again
and add access token here
https://gitlab.com/profile/personal_access_tokens
Upvotes: 14
Reputation: 945
Very late here, but for posterity's sake:
If you do not have a gitlab password (initially signed up through github or something), then this will fail. You will just need to go to the page and create a password. At least that worked for me.
Upvotes: 0
Reputation: 15050
For Windows users, check this unbelievable easy solution, which works for me:
Go to Windows Credential Manager (press Windows Key and type 'credential') to edit the git entry under Windows Credentials. Replace old password with the new one.
Upvotes: 21
Reputation: 692
if you made your account by signing in with Github or Bitbucket, etc. add a password to your account so you can push, pull and clone with Gitlab.
Upvotes: 0
Reputation: 38187
git config --system --unset credential.helper
then enter new password for Git remote server.
Upvotes: 6
Reputation: 2568
You need to add an SSH key to your GitLab and make sure git is using that key.
You can find this documentation helpful.
Upvotes: 8