Running on Windows 7.
I have a bare repository at http://locode01:8080/scm/git/hpmis_calc_engine and a local clone.
When I try to push from my clone I am asked for my password: the username box is pre-populated with the name of the repository host 'locode01'. Naturally, this push fails.
The full output for the push command is:
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master Pushing to http://locode01:8080/scm/git/hpmis_calc_engine fatal: Authentication failed Pushing to http://locode01:8080/scm/git/hpmis_calc_engine fatal: Authentication failed Pushing to http://locode01:8080/scm/git/hpmis_calc_engine
The same repository pushes correctly when using TortoiseGIT, GIT cli, etc. - in each case I am asked for the username and password.
How do I specify the HTTP authentication username in Sourcetree?
You can specify the username just by pre-pending it to the url like this:
https://username@host/path/to/repo
However when I test a https URL here without specifying the username, I get prompted for the username too. The way ST does this is it checks to see if the prompt from git asks for the username or just the password, so I'm not sure why it's getting that wrong. Will tryt o reproduce.
Ok, so the problem is that when you include the port in the URL a username is incorrectly derived from the hostname. It doesn't happen if the port is standard. Logged as a bug: https://jira.atlassian.com/browse/SRCTREEWIN-415
I've also confirmed that adding the username to the URL as shown above works around the problem in the mean time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.