简体   繁体   中英

GitLab: Remote access denied fatal - authentication failed

yesterday i was coding, when i do the commit into a repo, i cannot do it because, gitlab send me two messages.

this message appears at the moment i was trying to commit

  1. On branch master Your branch is ahead of 'origin/master' by 2 commits. (use "git push" to publish your local commits)

after when i insert "git pull"

  1. remote: HTTP Basic: Access denied fatal: Authentication failed for (link of the repository)

"git push"

remote: HTTP Basic: Access denied fatal: Authentication failed for

help me please!

I think it's too late, But if some windows user is having the issue. Here is the working solution. I have updated my credentials on gitlab. Git bash stores credentials in the Windows Vault using Generic Credentials in the 'Control Panel > User Accounts > Credential Manager' . After updating my password to match the current value I was able to 'git push'.

now is 2021 year, the most possible reason is:

Gitlab not allow password access, but recommend use: access token .

  • how to use Gitlab access token?
    • Core Logic:
      • create token : in gitlab Profile -> Settings -> Access Tokens ->input name, select all, create personal access token
      • use access token instead of git password : when git push, (in popup window) need input access token (into password field), NOT use git password
    • Detailed steps: please refer JavAlex's answer in another post (I have updated my answer into it)

yesterday i was coding, when i do the commit into a repo, i cannot do it because, gitlab send me two messages.

this message appears at the moment i was trying to commit

  1. On branch master Your branch is ahead of 'origin/master' by 2 commits. (use "git push" to publish your local commits)

after when i insert "git pull"

  1. remote: HTTP Basic: Access denied fatal: Authentication failed for (link of the repository)

"git push"

remote: HTTP Basic: Access denied fatal: Authentication failed for

help me please!

First generate pair of ssh-key on your local git bash

Open Git bash Terminal and type this

ssh-keygen -t rsa -b 2048 -C "youremailaddress"

Then press enter and enter

then do cat ~/.ssh/id_rsa

and copy the contents of the id_rsa.pub file to your clipboard and go to your gitlab profile settings >> ssh key and paste this key and done

For anyone who is getting this error also on non-Windows platforms with GitLab 13+. There is another reason apart from invalid credentials.

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 and got the LDAP authentication working again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM