diff --git a/config.md b/config.md new file mode 100644 index 0000000..3ab4651 --- /dev/null +++ b/config.md @@ -0,0 +1,36 @@ +### Git Config 相關指令 + +#### 列出所有設定 +```sh +git config --list +``` + +可以指定要列出哪一個層級的設定,例如: global +```sh +git config --global --list +``` + +#### 編輯 config +```sh +git config --global --edit +``` + +#### 取得相關設定 +```sh +git config [key] +``` + +ex: user.name +``` +git config user.name +``` + +#### 修改個別設定 +```sh +git config --[config-level] [key] [value] +``` + +ex: user.email +```sh +git config --global user.name abc@mail.com +``` \ No newline at end of file diff --git a/credential.md b/credential.md index e809dc6..9196eac 100644 --- a/credential.md +++ b/credential.md @@ -1,5 +1,25 @@ ## Git remote 登入驗證 ### Windows 10 密碼管理 +1. 安裝 Git Credential Manager for Windows +[Git Credential Manager for Windows](https://github.com/microsoft/Git-Credential-Manager-for-Windows/releases) + +2. 設定 git credential.helper +```sh +git config --global credential.helper manager +``` + 在 windows 10 裡,到以下的位置,可以管理git的登入密碼 -![windows 10 密碼管理](images/win10_credential.png) \ No newline at end of file +![windows 10 密碼管理](images/win10_credential.png) + + +### git credential helper +- 查看目前的設定 +```sh +git config --global credential.helper +``` + +### FAQ +- 認證管理員沒有相關密碼,沒有跳出詢問密碼,直接回應 fatal authentication failed. +暫時不知道什麼原因,不過可以直接到認證管理員新增一筆資料後,就可以正常運作了。格式如下 +![Credential settings](images/win10_credential_entry.png) \ No newline at end of file diff --git a/debug.md b/debug.md new file mode 100644 index 0000000..63d4860 --- /dev/null +++ b/debug.md @@ -0,0 +1,10 @@ +### Debug 相關指令 +- 開啟GIT追蹤 +```sh +set GIT_TRACE=1 +``` + +- 開啟Git Credential Manager for Windows 追蹤 +```sh +set GCM_TRACE=1 +``` \ No newline at end of file diff --git a/images/win10_credential_entry.png b/images/win10_credential_entry.png new file mode 100644 index 0000000..8bb05fd Binary files /dev/null and b/images/win10_credential_entry.png differ