Search code examples
gitauthenticationgitlabpushsmartgit

SmartGit, unable to push, "remote: HTTP Basic: Access denied"


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

I've created Personal Access Tokens with all available scopes included and placed it in Edit -> Preferences -> Hosting Providers for the GitLab account, but I still can't push. The GitLab account has 2FA and I also have this installed if it matters.

Windows 10 x64.


Solution

  • Since you have a credential helper installed, check if it is active:

    cd C:\path\to\repo
    git config credential.helper
    

    If it returns "manager", open your Windows Credentials Manager and check if credentials are already stored for gitlab.com.
    If so, delete it, then push again: Git should ask for your credentials. Do enter your PAT (Personal Access Token) as password.