A
A
Alexander Petrov2016-10-23 23:29:20
SSH
Alexander Petrov, 2016-10-23 23:29:20

Why is ssh not allowed?

I'm trying to put the site through capistrano. the following is happening.

MBP-Aleksandr:lesson-web-new aleksandrpetrov$ cap production deploy
Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
Enter passphrase for /Users/aleksandrpetrov/.ssh/id_rsa:gecnjqlbcr
rvm 1.27.0 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]
Enter passphrase for /Users/aleksandrpetrov/.ssh/id_rsa:gecnjqlbcr
ruby-2.3.0
ruby 2.3.0p0 (2015-12-25 revision 53290) [i686-linux]
00:00 git:wrapper
      01 mkdir -p /tmp/lesson-web-new/
    ✔ 01 [email protected] 0.099s
      Uploading /tmp/lesson-web-new/git-ssh.sh 100.0%
      02 chmod +rx /tmp/lesson-web-new/git-ssh.sh
    ✔ 02 [email protected] 0.103s
00:00 git:check
      01 git ls-remote --heads [email protected]:Mirkom63/lesson-web-new.git
      01 Permission denied (publickey).
      01 fatal: Could not read from remote repository.
      01
      01 Please make sure you have the correct access rights
      01 and the repository exists.
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: git exit status: 128
git stdout: Nothing written
git stderr: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

SSHKit::Command::Failed: git exit status: 128
git stdout: Nothing written
git stderr: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Tasks: TOP => git:check
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as [email protected]: git exit status: 128
git stdout: Nothing written
git stderr: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:

 DEBUG [68cbc936] Finished in 6.678 seconds with exit status 0 (successful).
 DEBUG [49c2d67c] Running ~/.rvm/bin/rvm 2.3.0 do ruby --version as [email protected]
 DEBUG [49c2d67c] Command: ~/.rvm/bin/rvm 2.3.0 do ruby --version
 DEBUG [49c2d67c] 	ruby 2.3.0p0 (2015-12-25 revision 53290) [i686-linux]
 DEBUG [49c2d67c] Finished in 4.998 seconds with exit status 0 (successful).
  INFO [7fbdd460] Running /usr/bin/env mkdir -p /tmp/lesson-web-new/ as [email protected]
 DEBUG [7fbdd460] Command: /usr/bin/env mkdir -p /tmp/lesson-web-new/
  INFO [7fbdd460] Finished in 0.099 seconds with exit status 0 (successful).
 DEBUG Uploading /tmp/lesson-web-new/git-ssh.sh 0.0%
  INFO Uploading /tmp/lesson-web-new/git-ssh.sh 100.0%
  INFO [4160c035] Running /usr/bin/env chmod +rx /tmp/lesson-web-new/git-ssh.sh as [email protected]
 DEBUG [4160c035] Command: /usr/bin/env chmod +rx /tmp/lesson-web-new/git-ssh.sh
  INFO [4160c035] Finished in 0.103 seconds with exit status 0 (successful).
  INFO [a6ed5068] Running /usr/bin/env git ls-remote --heads [email protected]:Mirkom63/lesson-web-new.git as [email protected]
 DEBUG [a6ed5068] Command: ( export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/lesson-web-new/git-ssh.sh" ; /usr/bin/env git ls-remote --heads [email protected]:Mirkom63/lesson-web-new.…
 DEBUG [a6ed5068] 	Permission denied (publickey).
 DEBUG [a6ed5068] 	fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I have macOS. Updated to Sierra today. Now I can’t post a single site, writes that I don’t have rights (Before that, everything worked. I
generated a local key, copied the contents of id_rsa.pub to bitbucket and to the server in authorized_keys. Nothing works ....
moreover, when I launch the deploy, the terminal asks enter the password for the key.This did not happen before either....

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
CityCat4, 2016-10-24
@CityCat4

Well, it means that the key with the password was generated :) By default, when generating the key, the password is asked, if you set it, it will be :)
It is unlikely that anyone will parse this log. Can you login via ssh from the command line? With a password or through a key?

M
Max, 2016-10-24
@MaxDukov


01 git ls-remote --heads [email protected]:Mirkom63/lesson-web-new.git
01 fatal: Could not read from remote repository.

E
Eugene Burmakin, 2016-10-25
@Freika

I have macOS. Updated to Sierra today. Now I can’t post a single site, it says that I don’t have rights (Before that, everything worked.

Enter in the terminal ssh-add, you will be prompted to enter the passphrase for your ssh key. You enter the key, after that everything becomes the way. This is a Sierra joint. I saw somewhere that this should be done after each reboot, but I have not checked it myself yet.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question