何度もパスワードを求められてうるさいので簡略化する
何も考えないというのであれば以下のような形で良いのだが
git config credential.helper store
これだと平文で保存されてしまう。(~./gitcredential というファイルにパスワードもそのまま保存されている)
セキュリティ的に安心したいのでもう少し違うパターンを試す。
どうやらwindowsには他のcredential.helperがあるらしい。
しかし、windowsの場合はexeを落としてこないと行けないらしい
http://gitcredentialstore.codeplex.com/releases/view/106064
ダウンロードしてきた後、exeを叩く。
cygwinを起動して、認識されているかを見る
git help -a | grep credential-
credential-cache remote-ftp
credential-cache--daemon remote-ftps
credential-store remote-http
credential-winstore
こんな感じで出てきたら次に.gitconfigに以下を追加する
[credential]↲
helper = winstore↲
設定は以上。
本当に聞かれないか確かめる。
$ git pull
まずは、最初にこんな感じのダイアログがでてきたので入力する。
Already up-to-date.
認証できたようです。
もう一度やってみると、ダイアログが出てこない。
$ git pull
Already up-to-date.
再度聞かれなかったので、どうやら、できたようです。
補足
実際じゃあどこにパスワードとか保存されてるんだということですが 、[git を https 経由で使うときのパスワードを保存する]
(http://qiita.com/usamik26/items/c655abcaeee02ea59695)によると
Internet Explorer などと同じ場所にパスワードが保存され、以後はパスワード入力が不要になります。
ということです。
参考
https://ja.confluence.atlassian.com/bitbucketserver/permanently-authenticating-with-git-repositories-776639846.html
http://qiita.com/usamik26/items/c655abcaeee02ea59695