63
37

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】Gitで毎回パスワードを聞かれる時の解決法

Last updated at Posted at 2017-04-10

git pushやgit pullで毎回パスワードを聞かれる…

macOS Sierraにアップデート以降、git pushやpull、fetchといった動作の度に、sshの秘密鍵のパスフレーズを聞かれるようになったので、その解決法です。

sshのconfigファイルの先頭に以下を定義します。

~/.ssh/config
Host *
  UseKeychain yes
  AddKeysToAgent yes

これで、鍵のパスフレーズを入力した際にKeychain(キーチェーン)に自動的に保存されるようになるので、以後同じ状況になっても入力が不要になります:tada::tada:

63
37
3

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
63
37

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?