I have been using SourceTree for a while now and it used to work perfectly.
Today I started to receive the below error message when I try to pull form origin:
git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
error: Could not resolve host: (nil); nodename nor servname provided, or not known while accessing https://myUser@bitbucket.org/myUser/myProject.git/info/refs
fatal: HTTP request failed
Completed with errors, see above
As far as I am aware nothing has changed. Does anybody know how to solve this?
Kinds regareds
That looks like your machine's DNS configuration is wrong, you should check your network settings.
Hi Steve, thanks for trying to help.
I have asked our network administrator to take a look, all network settings seem to be fine. We have even removed the computer from te network and reconnected it outside the firewall etc, still the same issue.
SourceTree is able to connect to Bitbucket; it uses my accont settings to display all available 'Repositories on all of your hosted accounts'.
All other internet related things work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm, in that case the only thing I can think of is that something in your local repository's .git/config file is somehow incorrect, since it only seems to affect pulling in Git. Can you post the contents of this file in this thread?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Steve... you are a hero!
Within the config file i saw a section called [http] in which a 'proxy' is specified.
The value behind 'proxy' was incorrect. I changed it and now all is fine!
A lot of things have changed on our network (new server etc.) including the proxy address. I was not aware of SourceTree having a reference to the proxy address stored locally. I did not know i needed to change it here manually.
Tanks for your help!
(Should I mark your initial comment as 'the answere'?)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad you resolved it! This proxy configuration is for git rather than SourceTree but it would explain the problems you had. I'm surprised it was in the local configuration file for this repository, it's more typical to configure proxy settings globally in the '.gitconfig' file in your home directory - so if you've corrected the setting, it might be a good idea to move it to your global configuration and remove it from this local repo so if settings change again it won't confuse you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are right again:
I found it in the global '.gitconfig' located in my home directory.
Just double checked and the local configuration file, .git/config, does not contain this setting.
I now also understand it was a 'git-thing' and not a 'SourceTree-thing'.
Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I too am having similar problem. There is no mention of [HTTP] in local repository config or gitconfig file located in home. I tried to add with proxy/port and even user info but I receive same error. Can anyone help to resolve?
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch origin
error: The requested URL returned error: 407 while accessinghttps://mysite.git.beanstalkapp.com/xxx.git/info/refs
fatal: HTTP request failed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is a problem with the embedded GIT on Mac version of source tree. When I used system git (
/usr/bin/git) it worked flawlessly. just need to change the Source Tree setting to change the GIT from embedded one to this system one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I follow all of the given solution above, but still I am facing same issue.
I don't have any proxy as I checked config global and .git/config. It was working before without proxy.
I check `git config -l` there is nothing abnormal. All good as given below.
user.email=xxxxxxxxxx@yahoo.in
user.name=xxxxx_server
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https:\/\/xxxxx@bitbucket.org/xxxx/xxxx.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
I tried some of the other google solution.
I tried that as well. but not working. But the strange thing for me is.
When I restart SSH as I am pulling data in remote server
First time command run successfully but second time it show me below error
fatal: unable to access 'https:\/\/xxxxx@bitbucket.org/xxxx/xxxx.git/':
Couldn't resolve host 'bitbucket.org'
Can you please help me to resolve this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tengo este mismo problema que plantean el resto del grupo, pero no encuentro el archivo .gitconfig, donde lo ubico este me pueden dar una idea.
fatal: unable to access 'https://mendozaa@bitbucket.org/mendozaa/sifw.git/': Could not resolve host: bitbucket.org
Saludos
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.
I too am having similar problem. There is no mention of [HTTP] in local repository config or gitconfig file located in home. I tried to add with proxy/port and even user info but I receive same error. Can anyone help to resolve?
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch origin
error: The requested URL returned error: 407 while accessing https://mysite.git.beanstalkapp.com/xxx.git/info/refs
fatal: HTTP request failed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
have you tried to connect to this url directly? Seems like there's something wrong with the url, or the user on bitbucket or something similar. If you can't access the url manually, you know the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nica, thanks for your reply.
The url is what SourceTree calls 'source path'. It is automatically generated and works on another computer.
I do have the same issue when adding a new repository:
- After opening SourceTree i click on the 'Add Repository' icon
- I make sure the 'Clone Repository' tab is selected
- Behind the 'source path' item i click on the 'remote repositories...' button (little globe)
- This displays the repositories found in my account
- I select the related repository and click the OK button
- SourceTree now tells me "This is not a valid source path / URL"
When i click the little 'Details' button, it gives me the same error message as in the original post.
If i try the above on another computer, at the end SourceTree tells me "This is a Git repository"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I've reached my limit with this one... :-(
If it works on one Computer and doesn't on another I would try to check those nasty settings like DNS and such... but I don't believe this will solve your problem.
All the Best,
Nica
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.