We are able to login to Bitbucket by the browser, but when we try to clone we are getting a Connection refused,We have tried:git clone https://someuser.id@mybitbucket.FQDN.com:7990/proejct/repository.gitgit clone https://someuser.id@mybitbucket.FQDN.com/proejct/repository.git also by ssh and the connections is successful but the password says that is wrong, even if we add a ssh keygit clone ssh://fernando.cervantes@bitbucket.mmc.com/ow/owv2.git$ git clone https://user.id@mybitbucket.FQDN.com:7990/scm/test1/testconversion_mmcosgi01.gitCloning into 'test conversion_mmcosgi01'...fatal: unable to access 'https://user.id@mybitbucket.FQDN.com:7990/scm/test1/testconversion_mmcosgi01.git/': Failed to connect to my bitbucket.FQDN.com port 7990: Connection refused but to same Bitbucket sever (same FQDN) with port 7990 I am able to access over Browser with similar UserName and Password.
Have you tried using the URL that you get from Bitbucket when you click on clone button? The SSH URL does not look correct, it should look something like this:
ssh://git@bitbucket.myserver.com:7999/pr/repository.git
Do you have a firewall in between your Bitbucket Server and the clients?
Hi Mikael,
We are doing both connectivities from my company network. So, for your query I can say certainly there would be a firewall. Our network team already allowed (opened) port # 7990 on our firewalls.
Strange issue is - from browser with same user name & password we are able to connect to Bitbucket server.
However, whenever we try same for any GIT operations it is not working. We are not able to do GIT clone/pull/fetch etc.
I have checked that the users who are trying for GIT operations they are allowed to work on that repository. Even repository owners are also not able to clone/push/pull on the repositories or server.
Can you, please, guide me how to determine that issue is lying at what level?
Is there any configuration supposed to be enable at Bitbucet server level ? OR Is something is blocking from network? How to determine issue remains at which end ?
@MayurMMC I am not a network expert, so cannot tell you how to determine were the issue is. If you have a SSH key setup you could try and see what the output from this command tells you:
ssh -vT bitbucket.myserver.com
If you get to the point that it asks for a password your firewall/proxy is setup to allow ssh connections to you Bitbucket server.
I asked user to run above command. Please, see the output
$ ssh -vT bitbucket.mmc.comOpenSSH_7.5p1, OpenSSL 1.0.2k 26 Jan 2017debug1: Reading configuration data /etc/ssh/ssh_configdebug1: Connecting to bitbucket.mmc.com [54.177.200.45] port 22.debug1: Connection established.debug1: identity file /c/Users/David.Lubin/.ssh/id_rsa type 1debug1: key_load_public: No such file or directorydebug1: identity file /c/Users/David.Lubin/.ssh/id_rsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /c/Users/David.Lubin/.ssh/id_dsa type -1debug1: key_load_public: No such file or directorydebug1: identity file /c/Users/David.Lubin/.ssh/id_dsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /c/Users/David.Lubin/.ssh/id_ecdsa type -1debug1: key_load_public: No such file or directorydebug1: identity file /c/Users/David.Lubin/.ssh/id_ecdsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /c/Users/David.Lubin/.ssh/id_ed25519 type -1debug1: key_load_public: No such file or directorydebug1: identity file /c/Users/David.Lubin/.ssh/id_ed25519-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_7.5debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000debug1: Authenticating to bitbucket.mmc.com:22 as 'david.lubin'debug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug1: kex: algorithm: curve25519-sha256@libssh.orgdebug1: kex: host key algorithm: ecdsa-sha2-nistp256debug1: kex: server->client cipher: aes128-ctr MAC: umac-64@openssh.com compression: nonedebug1: kex: client->server cipher: aes128-ctr MAC: umac-64@openssh.com compression: nonedebug1: expecting SSH2_MSG_KEX_ECDH_REPLYdebug1: Server host key: ecdsa-sha2-nistp256 SHA256:CbiyAyRyHD2JqGzzpMija3GdcMAURP5OObHNzKInwkwdebug1: Host 'bitbucket.mmc.com' is known and matches the ECDSA host key.debug1: Found key in /c/Users/David.Lubin/.ssh/known_hosts:5debug1: rekey after 4294967296 blocksdebug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug1: SSH2_MSG_NEWKEYS receiveddebug1: rekey after 4294967296 blocksdebug1: SSH2_MSG_SERVICE_ACCEPT received###############################################################################################ALERT! You are entering into a secured area!Your IP, Login Time, Username has been noted and has been sent to the server administrator!This service is restricted to authorized users only. All activities on this system are logged.Unauthorized access will be fully investigated and reported to the appropriate authorities.###############################################################################################debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,passworddebug1: Next authentication method: publickeydebug1: Offering RSA public key: /c/Users/David.Lubin/.ssh/id_rsadebug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,passworddebug1: Trying private key: /c/Users/David.Lubin/.ssh/id_dsadebug1: Trying private key: /c/Users/David.Lubin/.ssh/id_ecdsadebug1: Trying private key: /c/Users/David.Lubin/.ssh/id_ed25519debug1: Next authentication method: passworddavid.lubin@bitbucket.mmc.com's password:debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,passwordPermission denied, please try again.david.lubin@bitbucket.mmc.com's password:Received disconnect from 54.177.200.45 port 22:2: Too many authentication failures for david.lubinAuthentication failed.
Have you tried using the URL that Bitbucket provide you when you click clone in the repository? The SSH URL should look something like this:
Yes I tried with both Ports 7990 & 7999.
Through port 7990 on Browser I am able to login.
U1102983@USHBKML8XSPXZ1 MINGW64 ~$ ssh -T mayur.rami@bitbucket.mmc.com 7990###############################################################################################ALERT! You are entering into a secured area!Your IP, Login Time, Username has been noted and has been sent to the server administrator!This service is restricted to authorized users only. All activities on this system are logged.Unauthorized access will be fully investigated and reported to the appropriate authorities.###############################################################################################mayur.rami@bitbucket.mmc.com's password:Permission denied, please try again.mayur.rami@bitbucket.mmc.com's password:Received disconnect from 54.177.200.45 port 22:2: Too many authentication failures for mayur.ramiAuthentication failed.
U1102983@USHBKML8XSPXZ1 MINGW64 ~$ ssh -T mayur.rami@bitbucket.mmc.com 7999###############################################################################################ALERT! You are entering into a secured area!Your IP, Login Time, Username has been noted and has been sent to the server administrator!This service is restricted to authorized users only. All activities on this system are logged.Unauthorized access will be fully investigated and reported to the appropriate authorities.###############################################################################################mayur.rami@bitbucket.mmc.com's password:Permission denied, please try again.mayur.rami@bitbucket.mmc.com's password:Received disconnect from 54.177.200.45 port 22:2: Too many authentication failures for mayur.ramiAuthentication failed.
same behavior with port 22, too.
U1102983@USHBKML8XSPXZ1 MINGW64 ~$ ssh -T mayur.rami@bitbucket.mmc.com 22###############################################################################################ALERT! You are entering into a secured area!Your IP, Login Time, Username has been noted and has been sent to the server administrator!This service is restricted to authorized users only. All activities on this system are logged.Unauthorized access will be fully investigated and reported to the appropriate authorities.###############################################################################################mayur.rami@bitbucket.mmc.com's password:Permission denied, please try again.mayur.rami@bitbucket.mmc.com's password:Received disconnect from 54.177.200.45 port 22:2: Too many authentication failures for mayur.ramiAuthentication failed.
I run similar command but seems there is some issue with key file. Seems it is getting is_rsa type 1 but on next line immediately shows debug1: key_load_public: No such file or directory
debug1: Connection established.debug1: identity file /p/.ssh/id_rsa type 1debug1: key_load_public: No such file or directory
...
but post
debug1: SSH2_MSG_SERVICE_ACCEPT received
seems it is not able to use id_rsa public key.
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,passworddebug1: Next authentication method: publickeydebug1: Offering RSA public key: /p/.ssh/id_rsa
And falls back on password mechanism.
=-=-=-=-=
U1102983@USHBKML8XSPXZ1 MINGW64 ~$ ssh -v mayur.rami@bitbucket.mmc.com 7999OpenSSH_7.5p1, OpenSSL 1.0.2l 25 May 2017debug1: Reading configuration data /etc/ssh/ssh_configdebug1: Connecting to bitbucket.mmc.com [54.177.200.45] port 22.debug1: Connection established.debug1: identity file /p/.ssh/id_rsa type 1debug1: key_load_public: No such file or directorydebug1: identity file /p/.ssh/id_rsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /p/.ssh/id_dsa type -1debug1: key_load_public: No such file or directorydebug1: identity file /p/.ssh/id_dsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /p/.ssh/id_ecdsa type -1debug1: key_load_public: No such file or directorydebug1: identity file /p/.ssh/id_ecdsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /p/.ssh/id_ed25519 type -1debug1: key_load_public: No such file or directorydebug1: identity file /p/.ssh/id_ed25519-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_7.5debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000debug1: Authenticating to bitbucket.mmc.com:22 as 'mayur.rami'debug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug1: kex: algorithm: curve25519-sha256@libssh.orgdebug1: kex: host key algorithm: ecdsa-sha2-nistp256debug1: kex: server->client cipher: aes128-ctr MAC: umac-64@openssh.com compression: nonedebug1: kex: client->server cipher: aes128-ctr MAC: umac-64@openssh.com compression: nonedebug1: expecting SSH2_MSG_KEX_ECDH_REPLYdebug1: Server host key: ecdsa-sha2-nistp256 SHA256:CbiyAyRyHD2JqGzzpMija3GdcMAURP5OObHNzKInwkwdebug1: Host 'bitbucket.mmc.com' is known and matches the ECDSA host key.debug1: Found key in /p/.ssh/known_hosts:1debug1: rekey after 4294967296 blocksdebug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug1: SSH2_MSG_NEWKEYS receiveddebug1: rekey after 4294967296 blocksdebug1: SSH2_MSG_SERVICE_ACCEPT received###############################################################################################ALERT! You are entering into a secured area!Your IP, Login Time, Username has been noted and has been sent to the server administrator!This service is restricted to authorized users only. All activities on this system are logged.Unauthorized access will be fully investigated and reported to the appropriate authorities.###############################################################################################debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,passworddebug1: Next authentication method: publickeydebug1: Offering RSA public key: /p/.ssh/id_rsadebug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,passworddebug1: Trying private key: /p/.ssh/id_dsadebug1: Trying private key: /p/.ssh/id_ecdsadebug1: Trying private key: /p/.ssh/id_ed25519debug1: Next authentication method: passwordmayur.rami@bitbucket.mmc.com's password:debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,passwordPermission denied, please try again.mayur.rami@bitbucket.mmc.com's password:Received disconnect from 54.177.200.45 port 22:2: Too many authentication failures for mayur.ramiAuthentication failed.
The first error you see indicate that your SSH keys are not where your Windows Home directory is. So if your home is on P: you need to either put the SSH folder under that drive, or set the environment variable HOME to point to where you store your SSH folder. Example:
My Windows profile is under c:\users\mikael and here I have my .ssh folder. But my login script sets my home to the Z:. In this case I would either have to copy my .ssh folder to Z: or set the HOME environment variable to equal c:\users\mikael
It looks like you're new here. Sign in or register to get started.