GitLab remote: HTTP Basic: Access denied and fatal Authentication

前端 未结 30 2187
攒了一身酷
攒了一身酷 2020-11-28 00:06

I am on mac OS unlike this post:

  • 'git push origin MyBranchName' throws error "HTTP Basic: Access denied"

I have password conf

相关标签:
30条回答
  • 2020-11-28 00:39

    Well, I faced the same issue whenever I change my login password.

    Below is the command I need to run to fix this issue:-

    git config --global credential.helper wincred
    

    After running above command it asks me again my updated username and password.

    0 讨论(0)
  • 2020-11-28 00:39

    When the Windows Credential Manager asks for your credentials to access GitLab, those are username and password you use when accessing GitLab. EG: use your email and password.

    0 讨论(0)
  • 2020-11-28 00:40

    It happen every time I'm forced to change the Windows password and none of above answers helped to me.

    Try below solution which works for me:

    1. Go to Windows Credential Manager. This is done in a EN-US Windows by pressing the Windows Key and typing 'credential'. In other localized Windows variants you need to use the localized term (See comments for some examples).

      alternatively you can use the shortcut control /name Microsoft.CredentialManager in the run dialog (WIN+R)

    2. Edit the git entry under Windows Credentials, replacing old password with the new one.
    0 讨论(0)
  • 2020-11-28 00:40

    I got the same error and I solved this by :

    1. Apply command from cmd (run as administrator)

      git config --system --unset credential.helper

    2. And then I removed gitconfig file from C:\Program Files\Git\mingw64/etc/ location (Note: this path will be different in MAC like "/Users/username")

    3. After that use git command like git pull or git push, it asked me for username and password. applying valid username and password and git command working.

    hope this will help you...

    0 讨论(0)
  • 2020-11-28 00:40

    For me, the following worked:

    Do not use your GitLab password, but create an access token and use it instead of your password:

    1. In GitLab, go to Settings > Access Tokens
    2. Create a new token (check api)
    3. git clone ...
    4. When you are asked for your password, copy and paste the access token instead of your GitLab password
    0 讨论(0)
  • 2020-11-28 00:40

    I beleive I'm little late here. But I think this would help the new peeps!

    My Errors were: remote: HTTP Basic: Access denied

    remote: You must use a personal access token with 'read_repository' or 'write_repository' scope for Git over HTTP.

    remote: You can generate one at https://gitlab.com/profile/personal_access_tokens

    fatal: Authentication failed for 'https://gitlab.com/PROFILE_NAME/REPO_NAME.git/'

    I'm on Ubuntu but this worked for me:

    1. Goto https://gitlab.com/profile/personal_access_tokens
    2. Create new token and mark check to all.
    3. Copy your token
    4. Now go to your Terminal and paste it like this.

    git clone https://oauth2:YOUR_TOKEN@gitlab.com/PROFILE_NAME/REPO_NAME.git/

    0 讨论(0)
提交回复
热议问题