LoginSignup
0
2

More than 1 year has passed since last update.

【Git】認証情報を保存する方法

Last updated at Posted at 2022-09-09

認証情報を保存する方法

一定時間メモリーに記憶する

一定時間メモリーに記憶させるためには以下のコマンドを実行します。

ターミナル
git config --global credential.helper cache --timeout 任意の秒数

デフォルトでは15分間記憶されます。

テキストファイルとして保存する

テキストファイルとして保存するには以下のコマンドを実行します。

ターミナル
git config --global credential.helper store --file 任意のファイルパス

デフォルトでは~/.git-credentialsに保存されます。

OSのキーチェーンに保存する

OSのキーチェーンに保存するには以下のコマンドを実行します。

  • Macの場合
ターミナル
git config --global credential.helper osxkeychain
  • Windowsの場合
ターミナル
git config --global credential.helper wincred
0
2
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
0
2