I'd like to authenticate git for bitbucket on WSL. I was able to successfully log in to GitHub, but not bitbucket. The bitbucket host can only be connected to via VPN, which I have on (I can see it in my browser).
When I "git clone https:bitbucketrepo..." from a windows cli, I get the expected git credential manager log in prompt and sign in via the browser and it works. But from wsl, it just hangs.
I tried to clone via ssh, but that hangs as well.
verbosity edit regarding ssh (note here I'm starting with an empty ~/.ssh/config file
:
I tried connecting via ssh with debug output for more transparency:
$ ssh -T [email protected] -vv
OpenSSH_9.6p1 Ubuntu-3ubuntu13.5, OpenSSL 3.0.13 30 Jan 2024
debug1: Reading configuration data /home/b2barry/.ssh/config
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 *
debug2: resolving "custombitbucketurl" port 22
debug1: Connecting to custombitbucketurl [<IP ADDR>] port 22.
debug1: connect to address <IP ADDR> port 22: Connection timed out
ssh: connect to host custombitbucketurl port 22: Connection timed out
I tried changing the port to 443 as per the first answer in this thread here, but that times out as well. In that case I was using the following ~/.ssh/config
:
Host custombitbucketurl
Hostname custombitbucketurl
Port 443
I'd like to authenticate git for bitbucket on WSL. I was able to successfully log in to GitHub, but not bitbucket. The bitbucket host can only be connected to via VPN, which I have on (I can see it in my browser).
When I "git clone https:bitbucketrepo..." from a windows cli, I get the expected git credential manager log in prompt and sign in via the browser and it works. But from wsl, it just hangs.
I tried to clone via ssh, but that hangs as well.
verbosity edit regarding ssh (note here I'm starting with an empty ~/.ssh/config file
:
I tried connecting via ssh with debug output for more transparency:
$ ssh -T [email protected] -vv
OpenSSH_9.6p1 Ubuntu-3ubuntu13.5, OpenSSL 3.0.13 30 Jan 2024
debug1: Reading configuration data /home/b2barry/.ssh/config
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 *
debug2: resolving "custombitbucketurl.com" port 22
debug1: Connecting to custombitbucketurl.com [<IP ADDR>] port 22.
debug1: connect to address <IP ADDR> port 22: Connection timed out
ssh: connect to host custombitbucketurl.com port 22: Connection timed out
I tried changing the port to 443 as per the first answer in this thread here, but that times out as well. In that case I was using the following ~/.ssh/config
:
Host custombitbucketurl.com
Hostname custombitbucketurl.com
Port 443
I realized that this was a symptom of a greater issue when in a different context I noticed that making any HTTP request was failing while I was connected to the VPN. Since I am on Windows 11, I solved this by making the following edits to my .wslconfig, as outlined here.
[wsl2]
networkingMode=mirrored
dnsTunneling=true
-vv
to get detailed logs. Or talk to your local IT support staff -- only someone who can actually look over your shoulder and interactively give you directions can usefully work with the lack of details here. – Charles Duffy Commented Jan 22 at 23:16bitbucket.org
- then you'll likely have to connect to a different port. The default SSH port on BB Server is 7999, but if that doesn't work then only your IT people can help you here. – Jim Redmond Commented Jan 23 at 0:16