Problems setting up git with github - ruby-on-rails

I've googled the heck out of this one, and it is still failing me.
ssh: Could not resolve hostname github: Name or service not known
fatal: The remote end hung up unexpectedly
Most of the problems with this seem to do with having the wrong keys being sent to the server,
which isn't the problem. I can SSH into github as stated in github's help pages. I did have this working fine before, but I had wiped out the repository, wiped out my keys, and started fresh.
Here is the output of ssh -v git#github.com:
OpenSSH_5.5p1 Debian-4ubuntu5, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug1: identity file /home/patrick/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/patrick/.ssh/id_rsa-cert type -1
debug1: identity file /home/patrick/.ssh/id_dsa type -1
debug1: identity file /home/patrick/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5github2
debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.5p1 Debian-4ubuntu5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /home/patrick/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/patrick/.ssh/id_rsa
debug1: Remote: Forced command: gerve blueshift9
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Remote: Forced command: gerve blueshift9
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions#openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.utf8
PTY allocation request failed on channel 0
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow#openssh.com reply 0
Hi! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Connection to github.com closed.
Transferred: sent 2648, received 2904 bytes, in 0.1 seconds
Bytes per second: sent 37663.4, received 41304.6
debug1: Exit status 1
Thanks!

what exactly are you doing to get this error? it suggests you're trying to connect to git#github, not git#github.com
ssh: Could not resolve hostname github: Name or service not known fatal: The remote end hung up unexpectedly
this means there is nothing wrong with your keys:
debug1: Authentication succeeded (publickey).
...
Hi! You've successfully authenticated, but GitHub does not provide shell access.

Related

Capistrano Puma AWS can't seem to pass RVM check

I am having trouble connecting Rails webapp to Amazon AWS codedeploy this is the result of:
pachanga:~/workspace (master) $ ssh -v deploy#13.59.79.103
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /home/ubuntu/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 13.59.79.103 [13.59.79.103] port 22.
debug1: Connection established.
debug1: identity file /home/ubuntu/.ssh/id_rsa type 1
debug1: identity file /home/ubuntu/.ssh/id_rsa-cert type -1
debug1: identity file /home/ubuntu/.ssh/id_dsa type -1
debug1: identity file /home/ubuntu/.ssh/id_dsa-cert type -1
debug1: identity file /home/ubuntu/.ssh/id_ecdsa type -1
debug1: identity file /home/ubuntu/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/ubuntu/.ssh/id_ed25519 type -1
debug1: identity file /home/ubuntu/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 pat OpenSSH* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1-etm#openssh.com none
debug1: kex: client->server aes128-ctr hmac-sha1-etm#openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 28:6c:c4:0c:e8:86:ee:c1:70:4e:35:cf:b3:29:86:61
debug1: Host '13.59.79.103' is known and matches the ECDSA host key.
debug1: Found key in /home/ubuntu/.ssh/known_hosts:17
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/ubuntu/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/ubuntu/.ssh/id_dsa
debug1: Trying private key: /home/ubuntu/.ssh/id_ecdsa
debug1: Trying private key: /home/ubuntu/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).
I am following a tutorial here the tutorial
I have authorized_keys and it has the does have the ssh in it.
I found it
the vi editor was deleting the first character in the ssh

Cannot deploy Rails application on Heroku

I've built a Rails app which I want to deploy on heroku. I can run the web application on my local machine.
When I type the command : git push heroku master I get the following error message:
git push heroku master
ssh: connect to host heruko.com port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
It seems to be an connection error. So I tried:
sh -v git#heroku.com
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to heroku.com [50.19.85.156] port 22.
debug1: Connection established.
debug1: identity file /Users/myname/.ssh/id_rsa type 1
debug1: identity file /Users/myname/.ssh/id_rsa-cert type -1
debug1: identity file /Users/myname/.ssh/id_dsa type -1
debug1: identity file /Users/myname/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version endosome
debug1: no match: endosome
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1 none
debug1: kex: client->server aes128-ctr hmac-sha1 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: RSA 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad
debug1: Host 'heroku.com' is known and matches the RSA host key.
debug1: Found key in /Users/myname/.ssh/known_hosts:6
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/myname/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to heroku.com ([50.19.85.156]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = fr_FR.UTF-8
PTY allocation request failed on channel 0
shell request failed on channel 0
Here I can see the authentication is successful. I don't understand why I cannot push on heroku and deploy my application.
Here are remote :
git remote -v
heroku git#heruko.com:aqueous-plateau-17182.git (fetch)
heroku git#heruko.com:aqueous-plateau-17182.git (push)
origin git#bitbucket.org:pracede/hubapp.git (fetch)
origin git#bitbucket.org:pracede/hubapp.git (push)
Do you have an idea or a suggestion?
You have a typo in your git remotes:
git#heruko.com:aqueous-plateau-17182.git
It's heroku, not heruko :)

Heroku Permission denied. fatal: Could not read from remote repository.

So i have tried everything i can find and im panicing so please help
When i do a fresh heroku create on my app it genirates fine
then i go to git push heroku master.
I get the error
Jacks-MacBook-Air:morph jacksharville$ git push heroku master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
i have tried clear the keys with heroku keys:clear
I have then tried running heroku keys:add
It still comes up with the same error.
if i run ssh -vT git#heroku.com
this is the output
Jacks-MacBook-Air:morph jacksharville$ ssh -vT git#heroku.com
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to heroku.com [50.19.85.154] port 22.
debug1: Connection established.
debug1: identity file /Users/jacksharville/.ssh/id_rsa type 1
debug1: identity file /Users/jacksharville/.ssh/id_rsa-cert type -1
debug1: identity file /Users/jacksharville/.ssh/id_dsa type -1
debug1: identity file /Users/jacksharville/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version endosome
debug1: no match: endosome
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1 none
debug1: kex: client->server aes128-ctr hmac-sha1 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: RSA 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad
debug1: Host 'heroku.com' is known and matches the RSA host key.
debug1: Found key in /Users/jacksharville/.ssh/known_hosts:3
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/jacksharville/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to heroku.com ([194.168.4.123]:53).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_GB.UTF-8
shell request failed on channel 0
What happens if you do heroku auth:login and then log in with your credentials?
Do you still get the same error?
There is no way to fix this easily. The way i ended up getting around it is creating a new app and dragging assets across.

OS X Server + GIT integration with SSH Fails with Permission Denied Error

I have GIT server hosted on separate Linux server. I have SSH RSA keys without password.
I am able to connect to GIT Server with Xcode and all operations are working properly in Source Control through Xcode 5.0.2.
I have OS X Server install in my local machine.
Following is my OS X Server setup configuration:
Added the Remote Repository as : ssh://myuser#XXXXXXX.XXXX.com:22/iphone_project
I had make sure that my public is correct in OS X Server for SSH. I had copy paste SSH pub key from /.ssh/id_rsa.pub to OS X Server.
.
Cloning into 'ssh_XXXX_XXXX_XXX_com_22_mtp_iphone'...
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to XXXXXX.XXXXXX.com [172.20.10.65] port 22.
debug1: Connection established.
Could not create directory '/var/teamsserver/.ssh'.
debug1: identity file /Library/Server/Xcode/Data/BotRuns/BotRun-92b17427-aac4-40fa-92fa-5c73384b7d0f.bundle/credentials/b5964671-8db0-482c-93ee-870a0243295d/id_rsa type 1
debug1: identity file /Library/Server/Xcode/Data/BotRuns/BotRun-92b17427-aac4-40fa-92fa-5c73384b7d0f.bundle/credentials/b5964671-8db0-482c-93ee-870a0243295d/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 26:70:37:3a:56:bd:17:bd:9d:6a:14:c0:21:23:65:1c
debug1: Host 'XXXXXX.XXXX.com' is known and matches the RSA host key.
debug1: Found key in /Library/Server/Xcode/Config/ssh_known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1: Miscellaneous failure (see text)
No credentials cache file found
debug1: An invalid name was supplied
unknown mech-code 0 for mech 1 2 752 43 14 2
debug1: Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 5 14
debug1: Miscellaneous failure (see text)
unknown mech-code 2 for mech 1 3 6 1 4 1 311 2 2 10
debug1: An unsupported mechanism was requested
unknown mech-code 0 for mech 1 3 5 1 5 2 7
debug1: Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 2 5
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Library/Server/Xcode/Data/BotRuns/BotRun-92b17427-aac4-40fa-92fa-5c73384b7d0f.bundle/credentials/b5964671-8db0-482c-93ee-870a0243295d/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: permanently_drop_suid: 94
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: permanently_drop_suid: 94
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: permanently_drop_suid: 94
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
SSH Known Hosts file path is located at /Library/Server/Xcode/Config/ssh_known_hosts
SSH strict host checking is disabled (you can enable this by editing the SSHStrictHostKeyChecking key in /Library/Server/Xcode/Config/xcsbuildd.plist
Untrusted HTTPS certificates is disabled (you can enable this by editing the TrustSelfSignedSSLCertificates key in /Library/Server/Xcode/Config/xcsbuildd.plist
My Question is: Why my authentication is still failing after all configuration setup?
Are there any missing point in set up of GIT or OS X SERVER?
Make sure of the exact account which make the ssh command:
Its $HOME/.ssh must have id_rsa.pub, and id_rsa (public and private key).
Make sure the permission of the .ssh folder and its files is correct, as described in "Git SSH authentication" .
With EGit, those folder are referenced and declared in "Eclipse SSH Configuration":

Shell access is disabled with bitbucket from remote server

I have added my cat ~/.ssh/id_rsa.pub from my remote server to bitbucket ssh keys.
However when I try connect from my remote server with bitbucket I get:
PTY allocation request failed on channel 0
conq: logged in as hyperrjas.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
I have changed the default ssh port (22) to other port in my remote server. I don't know if this is the problem.
This is the debug when I enter ssh -v git#bitbucket.org from my remote server.
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to bitbucket.org [111.111.111.111] port 22.
debug1: Connection established.
debug1: identity file /home/hyperrjas/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/hyperrjas/.ssh/id_rsa-cert type -1
debug1: identity file /home/hyperrjas/.ssh/id_dsa type -1
debug1: identity file /home/hyperrjas/.ssh/id_dsa-cert type -1
debug1: identity file /home/hyperrjas/.ssh/id_ecdsa type -1
debug1: identity file /home/hyperrjas/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40
debug1: Host 'bitbucket.org' is known and matches the RSA host key.
debug1: Found key in /home/hyperrjas/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/hyperrjas/.ssh/id_rsa
debug1: Remote: Forced command: conq username:hyperrjas
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
Enter passphrase for key '/home/hyperrjas/.ssh/id_rsa':
debug1: read PEM private key done: type RSA
debug1: Remote: Forced command: conq username:hyperrjas
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([111.111.111.111]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions#openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
PTY allocation request failed on channel 0
conq: logged in as hyperrjas.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow#openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to bitbucket.org closed.
Transferred: sent 3072, received 2904 bytes, in 0.2 seconds
Bytes per second: sent 17083.9, received 16149.7
debug1: Exit status 0
I'm trying make a deploy with capistrano:
cap deploy:setup
* 2013-04-05 00:10:19 executing `deploy:setup'
* executing "mkdir -p /home/hyperrjas/apps/myapp /home/hyperrjas/apps/myapp/releases /home/hyperrjas/apps/myapp/shared /home/hyperrjas/apps/myapp/shared/system /home/hyperrjas/apps/myapp/shared/log /home/hyperrjas/apps/myapp/shared/pids"
servers: ["REMOTESERVERIP"]
connection failed for: REMOTESERVERIP (Errno::ECONNREFUSED: Connection refused - connect(2))
I have changed real bitbucket ip by 111.111.111.111. Also I have added passphrase for security reasons on my remote server
Where have I the error?
As mentioned in the message, you don't have shell access to bitbucket via ssh. The only git commands are allowed.
The problem was in the port. If you change the ssh port on your remote server.
You should not forget that you have to specify the SSH port on your your recipe to deploy with capistrano. Beware of this because I've gone crazy for two hours and apparently everything was correct and can make you lose a lot of time.
You can tell to capistrano the ssh port of the remote server, adding this command to your deploy.rb file:
ssh_options[:port] = 11111 #replace your real ssh port instead 11111
Thank you very much.

Resources