8
9

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

Windows でGitHubのパスワード毎回聞かれないようにする

Posted at

まず、Microsoft買収前から変わっていませんが、GitHub公式的にはhttpsが推奨されていたので、httpsを使います。

GitHub.com > Git を使用する > リモートリポジトリを管理する > どのリモート URL を使うべきですか?

とはいえ毎回パスワードを入力するのは煩わしいです。

GitHub.com > Git を使用する > Git および GitHub を使ってみる > Git に GitHub のパスワードをキャッシュする

のページにはMac, Windows, Linuxともに説明されています。

Windowsでは

git config --global credential.helper wincred

の一行設定すればよいみたい…と思いきや

git: 'credential-wincred' is not a git command. See 'git --help'.

というエラーが出てしまいました。

現在は
microsoft/Git-Credential-Manager-for-Windows をインストールする必要があるみたいです。

これをインストールすると自動で(?) credential.helper=manager に切り替わるみたいです。

~/.gitconfig を見てみると

 [credential]
      helper = manager

となっていました。

これでエラーも出ず、パスワード入力も求められず扱えるようになりました。

8
9
1

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
8
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?