0

When using my Git client, I get:

Failed to connect to repository : Command "c:\program files \git\bin\git.exe Is remote -h ssh://git@git.vehraius.com:7999/dmp/hybris.git HEAD" returned status code 128:stdout
stderr: ssh:connect to host git.vahraius.com port 7999:Connection refused fatal: Could not read from remote repository.

Please make sure you have right access and repository exists.

Any Pointers?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • "Connection refused" implies that either that server is down or that there's something in the network that's keeping you from getting there. – Jim Redmond Nov 03 '17 at 18:45
  • Last week i configured SSL Certificate with Port No 443 in bitbucket....and it was working fine. Is it a port issue? –  Nov 03 '17 at 18:53
  • That's unlikely, since that certificate was for HTTPS connections and this is for SSH. – Jim Redmond Nov 03 '17 at 19:11
  • Right....but port no was 443...and its showing now 7999....why so? –  Nov 03 '17 at 19:16
  • Port 443 is for HTTPS. This is SSH, which needs a different port; Bitbucket Server uses 7999 for pushes and pulls over SSH so that you can still use port 22 (the default SSH port) to access the underlying server. – Jim Redmond Nov 03 '17 at 19:31
  • Thanks for your time Jim!!....What should i do to fix it asap...... –  Nov 03 '17 at 19:34

1 Answers1

0

You need to make sure what ssh private keys are served to your Bitbucket server when trying to access it.
Check the results of:

ssh -Tv git@git.vehraius.com

Then make sure the corresponding public key is registered in your BitBucket user SSH settings page.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • @SanyamBhatnagar So, what does the `ssh -Tv` shows you? – VonC Nov 05 '17 at 18:51
  • Actually putty is not installed...hence not recognizing SSH command. –  Nov 06 '17 at 07:40
  • @SanyamBhatnagar you don't need putty: ssh is included with Git. Use the right PATH: https://stackoverflow.com/a/45779657/6309 – VonC Nov 06 '17 at 07:42
  • ssh -Tv git@git..com OpenSSH_7.3p1, OpenSSL 1.0.2k 26 Jan 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Connecting to git..com [IP] port 22. debug1: connect to address IP port 22: Connection refused ssh: connect to host git..com port 22: Connection refused –  Nov 06 '17 at 08:02
  • Are you behind a proxy? Because ssh connections would be blocked by a proxy. – VonC Nov 06 '17 at 08:05
  • Its resolved by creating own user id and password(not ssh). But I have to do from SSH....Any process? –  Nov 06 '17 at 11:52
  • @SanyamBhatnagar yes, using https with a user/password will work. But for ssh, test if you are allowed to do ssh, with a telnet: https://serverfault.com/a/567302/783 – VonC Nov 06 '17 at 11:53