Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Authentication OK but push fails with Gitlab

Felix Postma
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 28, 2020

Hi,

I have trouble pushing to my Gitlab repo.

I use Sourcetree 3.3.8 on Windows. I use HTTPS and a Personal Access Token to authenticate, and according to Tools -> Options -> Authentication -> my gitlab account -> Edit, authentication is OK. I'm able to pull from the repo. However when I try to push, I get the error message:

"remote: HTTP Basic: Access denied

fatal: Authentication failed for <repo url>"

Upon retrying the push, the list of branches is empty.

Weirdly when using 3.3.8 on another Windows machine, with the same authentication method (different PAT of course), it works fine. Both PATs have the same scopes.

3 answers

1 accepted

0 votes
Answer accepted
Felix Postma
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 29, 2020

Pushing is working normally again.

First I updated the embedded version of git, which at least caused the branch to appear again in the Push pop-up. Upon doing the push a pop-up appeared asking me to select a credential manager. I downloaded the latest version of Git Credential Manager for Windows. Then I selected wincred in the credentials pop-up. (The pop-up was useful for this, since I too cannot currently launch the terminal in Sourcetree). 

0 votes
Jeremy Karouta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 27, 2022

I had the same issue, and I still don't know what the actual problem is, but the following solved it in my case:

Updating my system git, and switching to using that version.

Updating the embedded git didn't work, because I was already using the "latest" version available through the "update embedded" button. I did get some popups of the CredentialHelperSelector, but as I use a PAT I don't want to use any helper.

Some extra info if anyone has the same issue:

  • embedded git version: 2.36.0
  • system git version: 2.39.0 (after update, I didn't try to do anything using 2.33 which was installed before updating)
  • Gitlab CE version 15.1.6
  • PAT via HTTPS (and activated 2FA)

Moreover, the issue arose after needing to reset my windows password due to company policy. This password is used as a SSO for multiple systems, including GitLab. Previous password changes, however, did not affect my git process ever. Moreover, I did try to solve my issue by looking down that road, and finding several possible solutions to no avail: https://stackoverflow.com/questions/47860772/gitlab-remote-http-basic-access-denied-and-fatal-authentication

Edit: Finaly, I also tried using command line (opening the terminal using the SourceTree UI), and doing a git fetch there worked when entering my username and PAT). So I believe the issue has something to do with the credential managers, but I have no idea on what exactly is happening..

0 votes
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 28, 2020

Hi! 

Can you make from git push? 

just curios is this on git level or just SourceTree stucked with configs

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events