1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

STAGING環境でデプロイした時のSSHKit::Command::Failed: git ls-remote git@github.com:velljp/circus-vell.git 解決法

Posted at

エラー内容

リンクの内容

[cvsys@ip-10-1-0-21 ~]$ sh dist.sh
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
  INFO [c61e9b14] Running rsync -az -e ssh /home/cvsys/.rbenv/ 127.0.0.1:/home/cvsys/.rbenv as cvsys@localhost
 DEBUG [c61e9b14] Command: rsync -az -e ssh /home/cvsys/.rbenv/ 127.0.0.1:/home/cvsys/.rbenv
  INFO [a483de23] Finished in 0.449 seconds with exit status 0 (successful).
  INFO [9dfd5faf] Running rsync -az -e ssh /home/cvsys/.bash_profile 127.0.0.1:/home/cvsys/ as cvsys@localhost
 DEBUG [9dfd5faf] Command: rsync -az -e ssh /home/cvsys/.bash_profile 127.0.0.1:/home/cvsys/
  INFO [903ff29c] Finished in 0.271 seconds with exit status 0 (successful).
 DEBUG [f7dcc0b8] Running [ -d $HOME/.rbenv/versions/2.6.3 ] as cvsys@127.0.0.1
 DEBUG [f7dcc0b8] Command: [ -d $HOME/.rbenv/versions/2.6.3 ]
 DEBUG [cb35cb07] Finished in 0.211 seconds with exit status 0 (successful).
  INFO [b0593ade] Running /usr/bin/env mkdir -p /data/cvsys/circus-vell/shared/config as cvsys@127.0.0.1
 DEBUG [b0593ade] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.6.3" ; /usr/bin/env mkdir -p /data/cvsys/circus-vell/shared/config )
  INFO [06e444cb] Finished in 0.077 seconds with exit status 0 (successful).
  INFO [f634aa19] Running rsync -az -e ssh shared/config/ 127.0.0.1:/data/cvsys/circus-vell/shared/config as cvsys@localhost
 DEBUG [f634aa19] Command: rsync -az -e ssh shared/config/ 127.0.0.1:/data/cvsys/circus-vell/shared/config
  INFO [faf20864] Finished in 0.195 seconds with exit status 0 (successful).
  INFO [7253404c] Running /usr/bin/env mkdir -p /data/cvsys/log as cvsys@127.0.0.1
 DEBUG [7253404c] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.6.3" ; /usr/bin/env mkdir -p /data/cvsys/log )
  INFO [4b3e5039] Finished in 0.036 seconds with exit status 0 (successful).
  INFO [64aca33a] Running git ls-remote git@github.com:velljp/circus-vell.git HEAD as cvsys@localhost
 DEBUG [64aca33a] Command: git ls-remote git@github.com:velljp/circus-vell.git HEAD
 DEBUG [43c06e1d] 	Permission denied (publickey).
 DEBUG [43c06e1d] 	fatal: Could not read from remote repository.
 DEBUG [43c06e1d] 	
 DEBUG [43c06e1d] 	Please make sure you have the correct access rights
 DEBUG [43c06e1d] 	and the repository exists.
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Command::Failed: git ls-remote git@github.com:velljp/circus-vell.git HEAD exit status: 32768
git ls-remote git@github.com:velljp/circus-vell.git HEAD stdout: Nothing written
git ls-remote git@github.com:velljp/circus-vell.git HEAD 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 => bundle_rsync:check
(See full trace by running task with --trace)
The deploy has failed with an error: git ls-remote git@github.com:velljp/circus-vell.git HEAD exit status: 32768
git ls-remote git@github.com:velljp/circus-vell.git HEAD stdout: Nothing written
git ls-remote git@github.com:velljp/circus-vell.git HEAD stderr: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
WARNING: Use strings for Figaro configuration. 5495674 was converted to "5495674".
bundle exec ridgepole -c /data/cvsys/circus-vell/releases/20210616070711/config/database.yml -f /data/cvsys/circus-vell/releases/20210616070711/db/schemas/Schemafile --apply -E staging
Apply `/data/cvsys/circus-vell/releases/20210616070711/db/schemas/Schemafile`
No change

解決法

①別ターミナルを開き、以下のコマンドを入力する。

ssh-add
ssh -T git@github.com

②STAGINGサーバーのターミナルで再度デプロイする。

sh dist.sh
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?