4
5

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 5 years have passed since last update.

capistrano3で突然deploy時githubのprivate repositoryにssh接続できなくなった

Last updated at Posted at 2015-08-14

エラー

ERROR: Repository not found.
DEBUG [d98d0ce0] 	fatal: Could not read from remote repository.
DEBUG [d98d0ce0]
DEBUG [d98d0ce0] 	Please make sure you have the correct access rights
DEBUG [d98d0ce0] 	and the repository exists.

原因

リモートサーバーのsshキーを持ったリードエンジニアがgithubから抜けた

解決法

SSH Agent Forwarding(参考)
デプロイ先にSSHを設定する

デプロイ先にSSHを設定する

デプロイ用にssh-keygen

->

eval 'ssh-agent bash'
ssh-add

または

.ssh/config
Host github
  HostName github.com
  IdentityFile ~/.ssh/id_for_git
  User git

それでもエラー

Hostの方に.comを入れていなかったためエラーが発生したよう

.ssh/config
Host github.com
  HostName github.com
  IdentityFile ~/.ssh/id_for_git
  User git

参考

4
5
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
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?