Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git clone command is not working?

I am trying to clone bit bucket repo. Once I execute the following command after installing git I am facing following issue :

$ git clone https://[email protected]/username/reponame.git
Error :fatal: unable to access'https://[email protected]/username/reponame.git/': 
Failed to connect to hostname port 8000: Connection refused

How can I get past this error message?

like image 280
vimal mishra Avatar asked Dec 17 '16 14:12

vimal mishra


2 Answers

An https url should attempt to contact the port 443.

If it tries to contact 8000, that might indicate an intermediate proxy: check git config -l|grep -i proxy, or your environment variable (env or set|grep -i proxy)

You can also try a curl -L -v https://[email protected]/username/reponame.git to have more information.

Finally, don't forget to try and clone through ssh if https does not want to work: see "Set up SSH for Git", and git clone [email protected]:user/repo.git.

like image 123
VonC Avatar answered Sep 19 '22 04:09

VonC


Modify your url to use git or ssh protocol for transfer.

e.g. git clone https://github.com/abcd/bashScripts.git

becomes:

git clone [email protected]:abcd/bashScripts.git

like image 42
gopuvp Avatar answered Sep 19 '22 04:09

gopuvp