Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.38 KB | None | 0 0
  1. /root/.ssh
  2. [root@ip-172-22-4-44 .ssh]# ssh -T hg@bitbucket.org -v
  3. OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
  4. debug1: Reading configuration data /etc/ssh/ssh_config
  5. debug1: /etc/ssh/ssh_config line 56: Applying options for *
  6. debug1: Connecting to bitbucket.org [104.192.143.1] port 22.
  7. debug1: Connection established.
  8. debug1: permanently_set_uid: 0/0
  9. debug1: identity file /root/.ssh/id_rsa type -1
  10. debug1: identity file /root/.ssh/id_rsa-cert type -1
  11. debug1: identity file /root/.ssh/id_dsa type -1
  12. debug1: identity file /root/.ssh/id_dsa-cert type -1
  13. debug1: identity file /root/.ssh/id_ecdsa type -1
  14. debug1: identity file /root/.ssh/id_ecdsa-cert type -1
  15. debug1: identity file /root/.ssh/id_ed25519 type -1
  16. debug1: identity file /root/.ssh/id_ed25519-cert type -1
  17. debug1: Enabling compatibility mode for protocol 2.0
  18. debug1: Local version string SSH-2.0-OpenSSH_6.6.1
  19. debug1: Remote protocol version 2.0, remote software version conker_1.0.287-a1d21a7 app-126
  20. debug1: no match: conker_1.0.287-a1d21a7 app-126
  21. debug1: SSH2_MSG_KEXINIT sent
  22. debug1: SSH2_MSG_KEXINIT received
  23. debug1: kex: server->client aes128-ctr hmac-sha1 none
  24. debug1: kex: client->server aes128-ctr hmac-sha1 none
  25. debug1: kex: curve25519-sha256@libssh.org need=20 dh_need=20
  26. debug1: kex: curve25519-sha256@libssh.org need=20 dh_need=20
  27. debug1: sending SSH2_MSG_KEX_ECDH_INIT
  28. debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
  29. debug1: Server host key: RSA 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40
  30. debug1: Host 'bitbucket.org' is known and matches the RSA host key.
  31. debug1: Found key in /root/.ssh/known_hosts:2
  32. debug1: ssh_rsa_verify: signature correct
  33. debug1: SSH2_MSG_NEWKEYS sent
  34. debug1: expecting SSH2_MSG_NEWKEYS
  35. debug1: SSH2_MSG_NEWKEYS received
  36. debug1: SSH2_MSG_SERVICE_REQUEST sent
  37. debug1: SSH2_MSG_SERVICE_ACCEPT received
  38. debug1: Authentications that can continue: publickey
  39. debug1: Next authentication method: publickey
  40. debug1: Trying private key: /root/.ssh/id_rsa
  41. debug1: key_parse_private2: missing begin marker
  42. debug1: key_parse_private_pem: PEM_read_PrivateKey failed
  43. debug1: read PEM private key done: type <unknown>
  44. Enter passphrase for key '/root/.ssh/id_rsa':
  45. debug1: Trying private key: /root/.ssh/id_dsa
  46. debug1: Trying private key: /root/.ssh/id_ecdsa
  47. debug1: Trying private key: /root/.ssh/id_ed25519
  48. debug1: No more authentication methods to try.
  49. Permission denied (publickey).
  50. [root@ip-172-22-4-44 .ssh]#
  51.  
  52.  
  53. include_recipe 'chef-vault'
  54.  
  55. #installation of git
  56. package 'git' do
  57. action :install
  58. end
  59.  
  60. #declare the vault
  61. gitKey = chef_vault_item(:credentialsGit, 'git')
  62.  
  63. file "/root/.ssh/id_rsa" do
  64. content gitKey['git-key']
  65. mode 0600
  66. owner node['user']
  67. action :create
  68. notifies :run, 'execute[git ssh]', :immediately
  69. end
  70.  
  71. execute 'git ssh' do
  72. command 'GIT_SSH_COMMAND="ssh -i /root/.ssh/id_rsa"'
  73. user node['user']
  74. end
  75.  
  76. #pull down the repo
  77. git "/home/ec2-user/spring-app" do
  78. repository "git@bitbucket.org:sgreen22/emrwebapp.git"
  79. #I've tried a variety of these using the ext helper as per a guide, but still no good.
  80. # repository "ext::ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no git@bitbucket.org %S /sgreen22/emrwebapp.git"
  81. # repository "ext::ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no git@bitbucket.org:sgreen22/emrwebapp.git"
  82. checkout_branch "master"
  83. action :sync
  84. # ssh_wrapper "ssh -i /home/ec2-user/.ssh/id_rsa" #I've tried this but no effect
  85. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement