sajalsuraj
sajalsuraj

Reputation: 992

Unable to push the code on bitbucket - Port 443 issue

I am not able to push the code on bitbucket. When I run this command "git push origin branch_name", then it gives error -

fatal: unable to access 'https://[email protected]/folder/project.git/': Failed to connect to bitbucket.org port 443: Network is unreachable.

How to resolve this. Someone help ?

Upvotes: 2

Views: 1496

Answers (2)

Jim Redmond
Jim Redmond

Reputation: 5660

Are you able to reach Bitbucket from that specific server, either through a browser or using a tool like curl? "Network is unreachable" is a pretty strong indicator that something is wrong, either in the network configuration on that system or in the network between that system and Bitbucket.

Upvotes: 0

Huy Nguyen
Huy Nguyen

Reputation: 2070

Solution 1: Update hosts file

Add bitbucket.org IP to /etc/hosts file (It's work for me)

104.192.143.2 bitbucket.org

Solution 2: Config proxy server

Command to use:

git config --global http.proxy http://proxyuser:[email protected]:8080
  • change proxyuser to your proxy user
  • change proxypwd to your proxy password
  • change proxy.server.com to the URL of your proxy server
  • change 8080 to the proxy port configured on your proxy server

If you decide at any time to reset this proxy and work without proxy:

Command to use:

git config --global --unset http.proxy

Finally, to check the currently set proxy:

git config --global --get http.proxy

More details on Getting git to work with a proxy server

Upvotes: 5

Related Questions