23
10

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.

macOSのアップデートをした後にsshキーが無いと言われた

Last updated at Posted at 2018-02-05

macOSのアップデートをしたら,SourceTreeでpushができなくなりました

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v origin refs/heads/master:refs/heads/master 
Pushing to git@github.com:9wick/xxxx.git
ssh_askpass: exec(/usr/X11R6/bin/ssh-askpass): No such file or directory
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Completed with errors, see above

どうやら認証がうまく行かなくなったようです
いままでもsshキーでログインしていたのですが,なぜかキーファイルを見つけられなくなっていました.

/Users/ユーザー名/.ssh/id_rsaにキーを入れているのですが,/usr/X11R6/bin/ssh-askpassを探してない...と諦められているようです.

キーの場所の設定っていつの間に変わったんだろう・・・?

とりあえず,下記コマンドで再度登録したらエラーでなくなりました.

ssh-add ~/.ssh/id_rsa

###参考
https://github.com/Microsoft/vscode/issues/32097

23
10
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
23
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?