Authentication fail
Asked by Bardi, Eugenio:

Hello everybody,

When I try to fetch it says:

fatal: unable to update url base from redirection:  
asked for: https://\*\*\*myUser\*\*\*@\*\*\*myServer\*\*\*/bitbucket/scm/mot/\*\*\*myRepo\*\*\*.git/info/refs?service=git-upload-pack  
redirect: https://\*\*\*myUser\*\*\*@\*\*\*myServer\*\*\*//my.logout.php3?errorcode=19

I tried every suggestion found on this forum:

- delete all password saved, each from SourceTree, Chrome and Windows

- delete the file passwd

- disable SSL certificate from option and terminal

- reinstall Sourcetree

- Update Sourcetree

- Update GIT

I am 100% sure that proxy is fine and I can reach the Bitbucket Repo and the address of the Repo is fine. Now I am very lost because sometimes I solved following one of more of the steps above sometimes not, but apparently this time it seems I am not able to make it work again.

![SourceTreeProblem01.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/237853i526D75876058A53C/image-size/large?v=v2&px=999 "SourceTreeProblem01.PNG")

I work for a big company and it is not easy for me to reach IT for admin rights; this problem does not regard only me but many of my colleagues. We are fighting with this since years and if we are not able to solve it this time we are forced to change platform.

Please help me!

Thanks

Ciao


Answers:
author: Victor Menes
body: Hey Eugenio,

I will try to do my best here to try to help you with this issue and hopefully we could learn something together from this :)

This is usually because the URL you are trying to clone/fetch is not valid.

Based on the search I've made (which includes various investigations you will be required to do), below is the main itens I would consider checking to test and try to find the root cause:

- This issue might be related sometimes with network-specific changes, so have you checked with anyone from your network team?

- Even though you've stated that the proxy is fine, could you [please review your configuration](https://confluence.atlassian.com/kb/securing-your-atlassian-applications-with-apache-using-ssl-838284349.html) for it? As this could be related with the proxy redirection failure

- Have you changed the Bitbucket Base URL recently? And is this Base URL being used correctly on the command that is being issued? You could check [specifying the base URL for Bitbucket Server](https://confluence.atlassian.com/bitbucketserver/specifying-the-base-url-for-bitbucket-server-776640392.html) for more info

- Are you able to run the same fetch operation directly from the server hosting your Bitbucket?

- This clone/fetch operation have been tried with VPN enabled?

- One more thing, have you tried cloning using SSH to see if that works?

- Also, another article that could help you checking if the proxy is causing the issue, is trying to [clone bypassing the proxy](https://confluence.atlassian.com/bitbucketserverkb/how-do-i-bypass-a-proxy-for-bitbucket-server-826878770.html). If that works, you will be required to review your proxy config.

I think with above itens you would be able to have a good starting point to understand and try to resolve it.

I hope this is helpful somehow :)

comments: author: Bardi, Eugenio
body: Hello Victor,

thanks a lot for your support!

V - This issue might be related sometimes with network-specific changes, so have you checked with anyone from your network team?

E - Someone has the same problem as I, someone not, someone else receives different error messages that we could not solve, one of them reported above:

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags origin Dev_3:Dev_3  
fatal: unable to access [https://\*\*\*MyServer\*\*\*/bitbucket/scm/smc/\*\*\*MyRepo\*\*\*.git](https://atl-ict-areetecniche.ferrari.it/bitbucket/scm/smc/emipostpro.git/%27:) Empty reply from server  
Pushing to [https://](https://atl-ict-areetecniche.ferrari.it/bitbucket/scm/smc/emipostpro.git)[\*\*\*MyServer\*\*\*](https://atl-ict-areetecniche.ferrari.it/bitbucket/scm/smc/emipostpro.git/%27:)[/bitbucket/scm/smc/](https://atl-ict-areetecniche.ferrari.it/bitbucket/scm/smc/emipostpro.git)[\*\*\*MyRepo\*\*\*](https://atl-ict-areetecniche.ferrari.it/bitbucket/scm/smc/emipostpro.git/%27:)[.git](https://atl-ict-areetecniche.ferrari.it/bitbucket/scm/smc/emipostpro.git)  
Completed with errors, see above.

V - Even though you've stated that the proxy is fine, could you [please review your configuration](https://confluence.atlassian.com/kb/securing-your-atlassian-applications-with-apache-using-ssl-838284349.html) for it? As this could be related with the proxy redirection failure

E - As my colleagues, we were told to check the checkbox for disabling SSL certificate.

V - Have you changed the Bitbucket Base URL recently? And is this Base URL being used correctly on the command that is being issued? You could check [specifying the base URL for Bitbucket Server](https://confluence.atlassian.com/bitbucketserver/specifying-the-base-url-for-bitbucket-server-776640392.html) for more info

E - The URL never changed and it is fine. If I search for it with chrome it open correctly the bitbucket repo. The URL is the one that ever worked for me and my colleagues.

V - Are you able to run the same fetch operation directly from the server hosting your Bitbucket?

E - I don't know how to do that, but if I open the branch of the repo from chrome I am able to see the latest commits and download the files.

V - This clone/fetch operation have been tried with VPN enabled?

E - I tried each from company net, VPN and without VPN. Without VPN I am not able to reach the proxy.

V - One more thing, have you tried cloning using SSH to see if that works?

E - No, I did not, I am not sure I can do it without admin rights.

V - Also, another article that could help you checking if the proxy is causing the issue, is trying to [clone bypassing the proxy](https://confluence.atlassian.com/bitbucketserverkb/how-do-i-bypass-a-proxy-for-bitbucket-server-826878770.html). If that works, you will be required to review your proxy config.

E - I am sure proxy is reached fine because in my trials of fixing I tried also to change it and the errore from SourceTree changes from authentication to 407 proxy.

I hope these further info could help.

Thanks again!

Ciao


author: Victor Menes
body: Hey Eugenio,

Thank you for providing all these additional information!

**About SSH:**

Try cloning with SSH using this documentation and let me know if that works. I would like to test this to eliminate some possibilities as just like you said, it is working if you login via browser.

- [Creating SSH Keys](https://confluence.atlassian.com/bitbucketserver0717/creating-ssh-keys-1087535541.html)

- [Enable SSH Access to Git Repos](https://confluence.atlassian.com/bitbucketserver/enable-ssh-access-to-git-repositories-776640358.html)

Also, if you SSH into into the server running Bitbucket and run the same clone to a temporary directory, do you get the same issue?

* Was there any server migration by any chance? My first thought on this one would be Proxy issue, but that was already covered. So, we will need to figure it out somehow!
* Regarding the users facing this issue and the ones not, do they have the same git version and OS version?
* About the [how do I bypass a proxy for Bitbucket](https://confluence.atlassian.com/pages/viewpage.action?pageId=826878770), have you tried following those steps? I am asking because while searching I found some cases which were caused by proxies and users were having the same error message reported by you and your users.
* One other thing I've found was some users having issues which required them to bypass load balancers, is this your case as well by any chance?

And last but not least, I would like to highlight that I am trying to help from a different perspective, as usually we receive support tickets and logs that makes our life really easier compared to trying to help from here. But I will do my best to get this sorted out for you and your team :)


Tags: bitbucket-cloud

cloud

sourcetree