8

I am facing the same problem as Could not resolve host: bitbucket.org; nodename nor servname provided, or not known. I have tried ip address given in comment, but it also gave the same message. Please, help to solve the issue. Here is the error code:

    MYNAME@DEVELOPER8 /d/Projects
    $ git clone https://MYNAME@bitbucket.org/PATH/TO/REPO.git
    Cloning into 'REPO'...
    fatal: unable to access 'https://MYNAME@bitbucket.org/PATH/TO/REPO.git/': Could not resolve host: bitbucket.org
Community
  • 1
  • 1
Khasan 24-7
  • 456
  • 2
  • 5
  • 19
  • 1
    If you can't use the hostname and you can't use the IP address, it would seem that you're not connected to the internet. Or does using a browser to surf to some sites work? – brm Mar 20 '14 at 07:16
  • yes, internet is working fine. maybe it is network issue i have to solve? – Khasan 24-7 Mar 20 '14 at 07:21
  • The error 'could not resolve host' would imply that internet is not working fine. What did you test? Can you surf to https://bitbucket.org on the _same_ PC? – brm Mar 20 '14 at 17:31
  • Thank You for the comments, my internet connection is not very good but i have surfed bitbucket.org several times and it opened without any problem. – Khasan 24-7 Mar 23 '14 at 04:49
  • Are you behind a corporate proxy ? Is it enable and working fine in command line ? If you are under linux or git bash, try wget command on an adress using http, then https. It it fails, review your proxy config. – Jean-Rémy Revy Sep 22 '14 at 20:18
  • I am also facing the same problem. For sure it is not issue of internet speed or firewall. I have my private internet connection and on Ubuntu I have removed Network proxy as well. – Peaceful Jun 20 '15 at 14:56
  • I hope you have cleaned your network cache as you have removed network proxy recently – Khasan 24-7 Jun 24 '15 at 11:02
  • Use this syntax: ```git clone https://bitbucket.org/username/repo.git``` – Arman Apr 08 '18 at 05:43

2 Answers2

18

Sometimes we make mistakes configuring our proxy. Maybe this can help, reset your proxy.

git config --global --unset http.proxy
git config --global --unset https.proxy
andrewoodleyjr
  • 2,971
  • 2
  • 21
  • 21
3

When you create a repository in bitbucket, the user interface displays the exact clone command you need for you:

a busy cat

So, your clone command would need to be:

https://usersname@bitbucket.org/username/reponame.git

ankit singh
  • 367
  • 1
  • 3
  • 13
  • Not sure why but seems like the org level username I had in my clone command copied directly from their website did not work, I removed that username part from the url and it worked for me. – Bryan Apr 03 '23 at 18:50