Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /root/.ssh
- [root@ip-172-22-4-44 .ssh]# ssh -T hg@bitbucket.org -v
- OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
- debug1: Reading configuration data /etc/ssh/ssh_config
- debug1: /etc/ssh/ssh_config line 56: Applying options for *
- debug1: Connecting to bitbucket.org [104.192.143.1] port 22.
- debug1: Connection established.
- debug1: permanently_set_uid: 0/0
- debug1: identity file /root/.ssh/id_rsa type -1
- debug1: identity file /root/.ssh/id_rsa-cert type -1
- debug1: identity file /root/.ssh/id_dsa type -1
- debug1: identity file /root/.ssh/id_dsa-cert type -1
- debug1: identity file /root/.ssh/id_ecdsa type -1
- debug1: identity file /root/.ssh/id_ecdsa-cert type -1
- debug1: identity file /root/.ssh/id_ed25519 type -1
- debug1: identity file /root/.ssh/id_ed25519-cert type -1
- debug1: Enabling compatibility mode for protocol 2.0
- debug1: Local version string SSH-2.0-OpenSSH_6.6.1
- debug1: Remote protocol version 2.0, remote software version conker_1.0.287-a1d21a7 app-126
- debug1: no match: conker_1.0.287-a1d21a7 app-126
- 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: kex: curve25519-sha256@libssh.org need=20 dh_need=20
- debug1: kex: curve25519-sha256@libssh.org need=20 dh_need=20
- debug1: sending SSH2_MSG_KEX_ECDH_INIT
- debug1: expecting SSH2_MSG_KEX_ECDH_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 /root/.ssh/known_hosts:2
- debug1: ssh_rsa_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: Trying private key: /root/.ssh/id_rsa
- debug1: key_parse_private2: missing begin marker
- debug1: key_parse_private_pem: PEM_read_PrivateKey failed
- debug1: read PEM private key done: type <unknown>
- Enter passphrase for key '/root/.ssh/id_rsa':
- debug1: Trying private key: /root/.ssh/id_dsa
- debug1: Trying private key: /root/.ssh/id_ecdsa
- debug1: Trying private key: /root/.ssh/id_ed25519
- debug1: No more authentication methods to try.
- Permission denied (publickey).
- [root@ip-172-22-4-44 .ssh]#
- include_recipe 'chef-vault'
- #installation of git
- package 'git' do
- action :install
- end
- #declare the vault
- gitKey = chef_vault_item(:credentialsGit, 'git')
- file "/root/.ssh/id_rsa" do
- content gitKey['git-key']
- mode 0600
- owner node['user']
- action :create
- notifies :run, 'execute[git ssh]', :immediately
- end
- execute 'git ssh' do
- command 'GIT_SSH_COMMAND="ssh -i /root/.ssh/id_rsa"'
- user node['user']
- end
- #pull down the repo
- git "/home/ec2-user/spring-app" do
- repository "git@bitbucket.org:sgreen22/emrwebapp.git"
- #I've tried a variety of these using the ext helper as per a guide, but still no good.
- # repository "ext::ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no git@bitbucket.org %S /sgreen22/emrwebapp.git"
- # repository "ext::ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no git@bitbucket.org:sgreen22/emrwebapp.git"
- checkout_branch "master"
- action :sync
- # ssh_wrapper "ssh -i /home/ec2-user/.ssh/id_rsa" #I've tried this but no effect
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement