How to deploy to DigitalOcean server once the tests are passed?


#1

I am doing SecureCopy(scp command) to copy the successful build to my digitalocean server. I have even added the SSH permissions in the project settings. The ‘deploy_staging.sh’ file contains my scp command. But the deploy is not connecting to server automatically, instead it is waiting for the password even though i have mentioned it, its not copying the files to server

Executing: program /usr/bin/ssh host 18x.xxx.xxx.xxx, user (unspecified), command scp -v -r -t – /home/dev/temp
OpenSSH_5.9p1 Debian-5ubuntu1.7, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /home/ubuntu/.ssh/config

debug1: /home/ubuntu/.ssh/config line 13: Applying options for 18x.xxx.xxx.xxx

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: /etc/ssh/ssh_config line 19: Applying options for *

debug1: Connecting to 18x.xxx.xxx.xxx [18x.xxx.xxx.xxx] port xx.

debug1: Connection established.

debug1: identity file /home/ubuntu/.ssh/id_18x.xxx.xxx.xxx 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/ubuntu/.ssh/id_18x.xxx.xxx.xxx-cert type -1

debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3

debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3 pat OpenSSH*

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.7

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: sending SSH2_MSG_KEX_ECDH_INIT

debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

debug1: Server host key: ECDSA dd:f7:c4:e3:59:24:55:90:1e:76:8a:xx:xx:xx:xx:xx

Warning: Permanently added ‘18x.xxx.xxx.xxx’ (ECDSA) to the list of known hosts.

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,password

debug1: Next authentication method: publickey

debug1: Offering RSA public key: /home/ubuntu/.ssh/id_xxx.xxx.xxx.xxx

debug1: Authentications that can continue: publickey,password

debug1: Next authentication method: password

ubuntu@18x.xxx.xxx.xxx’s password: command ./deploy_staging.sh took more than 10 minutes since last output


#2

Hello,

Have you had a look at this?
https://bitkumo.com/blog/continuously-deploying-with-jekyll-and-circleci/

I have the same problem and I think it is due to the /home/circleci/.ssh/authorized_keys file.

Cheers


#3