gitでパスワードをキャッシュしておく方法

HTTPSでcloneしたリポジトリをpushする時などにパスワードを毎回要求されるのたるいので記憶しておきたい。 設定するたびにググるので備忘のためにメモる。以下の方法はMac専用。

$git credential-osxkeychain
$curl -s -O http://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain
$git config --global credential.helper osxkeychain

credential-osxkeychainはgit本体のディレクトリ以下に移動される。homebrewで入れていたとしたら/usr/local/Cellar/git//binあたり

- 参考