Hello everyone,
I’m experiencing a persistent issue when trying to push to my Bitbucket repository. Here’s what happens:
When I run the command:
git push -v origin master
It only shows:
Pushing to bitbucket.org:brazmix/exifdashboard.git
…and then nothing happens. The terminal remains stuck, and there’s no error message or timeout.
Checked DNS and Network Settings:
bitbucket.org
with nslookup
and get valid IP addresses (e.g., 104.192.142.24
).ping
those IP addresses, there’s no response.Firewall and DNS Configuration:
ufw
) to ensure it’s not blocking anything./etc/resolv.conf
to use Google DNS (8.8.8.8
) and cleared the DNS cache.Testing Connection on Different Ports:
VPN and Alternative Networks:
Has anyone encountered a similar issue or have any further suggestions on how I might resolve this? I appreciate any insights or advice you could provide!
Thank you!
Hey @Marvin Medeiros ,
and welcome to the Community!
The symptoms of the issue you reported strongly suggest a network issue or a firewall/proxy blocking the connection to Bitbucket's infrastructure.
Based on your description of the issue, I assume you're using SSH to interact with Bitbucket Cloud.
If that is the case, in order to further investigate this, I'd suggest the following steps:
1. Make sure that any firewall in place has bitbucket cloud IP's allowed
In case your machine is behind any firewall/proxy, make sure the Bitbucket Cloud IPs are allowed.
2. Test SSH connection with verbose logs
Try running the push again but with the ssh and git verbose flags enabled
GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git push
You can also test the isolated SSH connection using the following command :
# Using the default SSH port 22
ssh -Tvvv bitbucket.org
# Using the altssh endpoint on port 443
ssh -Tvvv -p 443 altssh.bitbucket.org
You can then share the log output here in this post so we can analyze it. Just make sure to sanitize the logs and remove any sensitive information as community is a public forum.
3. Test with a different protocol (HTTPS)
To test is the issue is isolated to SSH only, try cloning/pushing the repository over HTTPS instead, using your username and app password for authentication.
I hope that helps! Should you have any questions, feel free to ask.
Thank you, @Marvin Medeiros !
Patrik S
Hi, thanks for the reply. I also feel like its a network issue but i cant find out what is happening. I test running with verbose on, and this is what i got:
➜ html git:(master) GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git push origin master
15:50:04.017420 git.c:455 trace: built-in: git push origin master
15:50:04.018004 run-command.c:668 trace: run_command: unset GIT_PREFIX; 'ssh -vvv' git@bitbucket.org 'git-receive-pack '\''brazmix/exifdashboard.git'\'''
OpenSSH_8.9p1 Ubuntu-3ubuntu0.10, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /home/neo/.ssh/config
debug1: /home/neo/.ssh/config line 1: Applying options for bitbucket.org
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/neo/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/neo/.ssh/known_hosts2'
debug2: resolving "bitbucket.org" port 443
debug3: resolve_host: lookup bitbucket.org:443
debug3: ssh_connect_direct: entering
debug1: Connecting to bitbucket.org [2401:1d80:321c:1:0:bbc:1:df7c] port 443.
debug3: set_sock_tos: set socket 3 IPV6_TCLASS 0x10
debug1: connect to address 2401:1d80:321c:1:0:bbc:1:df7c port 443: Connection timed out
debug1: Connecting to bitbucket.org [2401:1d80:321c:2:0:bbc:1:df7c] port 443.
debug3: set_sock_tos: set socket 3 IPV6_TCLASS 0x10
Them i got stucked here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Marvin Medeiros ,
We can identify from the logs that your DNS is resolving to Bitbucket's IPv6. Maybe your ISP does not yet fully support IPv6.
Could you try forcing the use of IPv4 by adding the -4 flag in the git command?
GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git push -4 origin master
Also, I see you're trying to connect to port 443. The port 443 for SSH git operation is only available when using
altssh.bitbucket.org
So you'd need to either return to port 22, or change the remote origin of your local repository to use altssh domain:
git remote set-url origin git@altssh.bitbucket.org:443/Workspace/repo_name/
Thank you, @Marvin Medeiros !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Patrik, now using the IPV4 git command i got a different error message, see the details below:
$ html git:(master) GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git push -4 origin master
17:41:37.188358 git.c:455 trace: built-in: git push -4 origin master
17:41:37.188989 run-command.c:668 trace: run_command: unset GIT_PREFIX; 'ssh -vvv' -4 git@bitbucket.org 'git-receive-pack '\''brazmix/exifdashboard.git'\'''
OpenSSH_8.9p1 Ubuntu-3ubuntu0.10, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /home/neo/.ssh/config
debug1: /home/neo/.ssh/config line 1: Applying options for bitbucket.org
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/neo/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/neo/.ssh/known_hosts2'
debug2: resolving "bitbucket.org" port 443
debug3: resolve_host: lookup bitbucket.org:443
debug3: ssh_connect_direct: entering
debug1: Connecting to bitbucket.org [104.192.142.26] port 443.
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
debug1: Connection established.
debug1: identity file /home/neo/.ssh/id_rsa type 0
debug1: identity file /home/neo/.ssh/id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.10
kex_exchange_identification: banner line contains invalid characters
banner exchange: Connection to 104.192.142.26 port 443: invalid format
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Marvin Medeiros ,
According to the log message, it seems you're still using the bitbucket.org domain for SSH, which only works for port 22 :
debug1: Connecting to bitbucket.org [104.192.142.26] port 443.
As you're trying with port 443, the domain is different and you need to update the local repository origin by running the following command inside your local clone of the repo:
git remote set-url origin git@altssh.bitbucket.org:443/Workspace/repo_name/
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.