Guest User

Untitled

a guest
Sep 2nd, 2018
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. Permission denied (publickey).
  2.  
  3. jakes_mac:SomeCode jake$ cap staging deploy
  4. INFO [hkdgad21] Running /usr/bin/env mkdir -p /tmp/somecode/ as jake@example.com
  5. DEBUG [hkdgad21] Command: /usr/bin/env mkdir -p /tmp/somecode/
  6. jake@example.com's password:
  7. INFO [hkdgad21] Finished in 5.166 seconds with exit status 0 (successful).
  8. DEBUG Uploading /tmp/somecode/git-ssh.sh 0.0%
  9. INFO Uploading /tmp/somecode/git-ssh.sh 100.0%
  10. INFO [xyz20312] Running /usr/bin/env chmod +x /tmp/somecode/git-ssh.sh as jake@example.com
  11. DEBUG [xyz20312] Command: /usr/bin/env chmod +x /tmp/somecode/git-ssh.sh
  12. INFO [xyz20312] Finished in 0.240 seconds with exit status 0 (successful).
  13. INFO [abcdef01] Running /usr/bin/env git ls-remote --heads git@github.com:SomeUser/SomeCode.git as jake@example.com
  14. DEBUG [abcdef01] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/somecode/git-ssh.sh /usr/bin/env git ls-remote --heads git@github.com:SomeUser/SomeCode.git )
  15. DEBUG [abcdef01] Permission denied (publickey).
  16. DEBUG [abcdef01] fatal: Could not read from remote repository.
  17. DEBUG [abcdef01]
  18. DEBUG [abcdef01] Please make sure you have the correct access rights
  19. DEBUG [abcdef01] and the repository exists.
  20. (Backtrace restricted to imported tasks)
  21. cap aborted!
  22. SSHKit::Runner::ExecuteError: Exception while executing as jake@example.com: git exit status: 128
  23. git stdout: Nothing written
  24. git stderr: Permission denied (publickey).
  25. fatal: Could not read from remote repository.
  26.  
  27. Please make sure you have the correct access rights
  28. and the repository exists.
  29.  
  30. SSHKit::Command::Failed: git exit status: 128
  31. git stdout: Nothing written
  32. git stderr: Permission denied (publickey).
  33. fatal: Could not read from remote repository.
  34.  
  35. Please make sure you have the correct access rights
  36. and the repository exists.
  37.  
  38. Tasks: TOP => git:check
  39. (See full trace by running task with --trace)
  40. The deploy has failed with an error: Exception while executing as jake@example.com: git exit status: 128
  41. git stdout: Nothing written
  42. git stderr: Permission denied (publickey).
  43. fatal: Could not read from remote repository.
  44.  
  45. ssh-add -A
  46.  
  47. nano ~/.bash_profile
  48.  
  49. ssh-add -A 2>/dev/null;
  50.  
  51. ssh-add -D
  52.  
  53. eval "$(ssh-agent -s)"
  54.  
  55. ssh-add ~/.ssh/id_rsa.pub
  56.  
  57. ssh-add -K
  58.  
  59. nano ~/.bash_profile
  60.  
  61. ssh-add -K
  62.  
  63. sudo nano /etc/ssh/ssh_config
  64.  
  65. AddKeysToAgent yes
  66.  
  67. UseKeychain
  68. On macOS, specifies whether the system should search for
  69. passphrases in the user's keychain when attempting to use a par-
  70. ticular key. When the passphrase is provided by the user, this
  71. option also specifies whether the passphrase should be stored
  72. into the keychain once it has been verified to be correct. The
  73. argument must be ``yes'' or ``no''. The default is ``no''.
  74.  
  75. ssh(1): Add an AddKeysToAgent client option which can be set to
  76. 'yes', 'no', 'ask', or 'confirm', and defaults to 'no'. When
  77. enabled, a private key that is used during authentication will be
  78. added to ssh-agent if it is running (with confirmation enabled if
  79. set to 'confirm').
  80.  
  81. AddKeysToAgent yes
  82.  
  83. echo "AddKeysToAgent yes" >> ~/.ssh/config
  84.  
  85. $ ssh-add -l
  86. The agent has no identities.
  87. $ ssh -T git@bitbucket.org
  88. logged in as davidalger.
  89.  
  90. You can use git or hg to connect to Bitbucket. Shell access is disabled.
  91. $ ssh-add -l
  92. 2048 SHA256:<snip> (RSA)
  93.  
  94. eval $(ssh-agent -s)
  95. ssh-add ~/.ssh/id_rsa_file
Add Comment
Please, Sign In to add comment