I am trying to clone a bitbucket repository from my CentOS7 machine. I followed the Link to solve the issue, but no solution is working.
The command I am trying to run is:
git clone https://user@bitbucket.org/project/repository.git
and the Error I am getting is:
fatal: unable to access 'https://user@bitbucket.org/project/repository.git /': Failed connect to bitbucket.org:443; Connection refused
Can somebody please help me with the solution.
Is there anything be done from firewall side?
Hi Vinay! If you have firewall blocking IPv6 traffic, you may need to update the firewall config to permit our IPv6 addresses, you can read What are the Bitbucket Cloud IP addresses I should use? for more info. Otherwise, if that's not possible, adding 104.192.143.3 bitbucket.org to your hosts' file could also work as an alternative workaround which will force your machine to use our IPv4 address instead.
You may follow this guide to add it to your hosts' file.
You can also read the comments at https://bitbucket.org/site/master/issues/12184/failed-to-connect-to-bitbucketorg-port-443 if you need more ideas.
Hope that helps!
Ana
Hi Ana,
I followed the link you asked me to, did following:
> Added 104.192.143.3 bitbucket.org into the hosts file. But No help.
> Added host route entry for 104.192.136.0/21 and 104.192.143.0/24, then I could ping the bitbucket.org. following is the result:
[root@localhost siteadmin-xvelocity-ui]# ping bitbucket.org
PING bitbucket.org (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.122 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.083 ms
But when I am trying to clone a bitbucket repository, I am getting following error msg:
Cloning into 'Dev_integration1'...
fatal: unable to access 'https://user@bitbucket.org/project/repository.git /': Failed connect to bitbucket.org:443; Connection refused
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the exact same issue. I made the same hosts file change and I still get the same error message.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@YasirJawad The issue was resolved. I had to whitelist all the IPs of bitbucket. that way it worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Vinay Verma How were you able to whitelist all the IPs? Did you just add the IPv4 ranges to your hosts file?
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.