Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble with SSH and git clone

Garbook
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 19, 2018

Hi,


I use  "Automatic Bitbucket Deployment" and I'm having some trouble with that.
It would be very nice of you if you could help me or give a tip why it does not work for me.
I already did the following:

    1. SSH folder created for the Apache user (/var/www/.ssh)
    2. Key created for the Apache user without password (www-data)
    3. Copied public key into Bitbucket (Repository -> settings -> Access Key)
    4. Directory created on the server for the repository
    5. Webhook set up at Bitbucket
    6. PHP tool / script uploaded
    7. Server released in the config file

          Host bitbucket.org
          HostName bitbucket.org
          PreferredAuthentications publickey
          IdentityFile /var/www/.ssh/bitbucket

But if I now want to do the following step, then nothing happens:

git clone --mirror git@bitbucket.org: <teamname> /xxx.git

I get the following output:

Cloning into bare repository 'xxx' ...

and done. Nothing happens anymore, but I would still have to get a query if I want to add the server.
  I always have to abort the command so that I can continue working in the console.
I have to say that I have blocked port 22 for SSH on the server and instead use a different port 58989.
Can you please help me or give a hint, so that with me the automatic deployment works?

1 answer

1 accepted

0 votes
Answer accepted
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 21, 2018

You can collect more information from SSH by adding `GIT_SSH_COMMAND="ssh -v"` before your command. (You can also get more verbose by using `-vv` or `-vvv` instead.)

Just to clarify, though: when you say that you "have blocked port 22 for SSH on the server", are you referring to inbound connections to your server, or outbound connections from your server?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events