1

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!

Dashrath Mundkar
  • 3,376
  • 1
  • 13
  • 26
Nazir Rosas
  • 11
  • 1
  • 2

3 Answers3

6

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'.

Nouman Ghaffar
  • 3,510
  • 1
  • 28
  • 33
0

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

Dashrath Mundkar
  • 3,376
  • 1
  • 13
  • 26
0

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)
crifan
  • 8,424
  • 1
  • 45
  • 35