win10 credential manager

This commit is contained in:
CodyZhang
2020-06-12 15:55:12 +08:00
parent 8d39d459c1
commit 1114d0c6ca
4 changed files with 67 additions and 1 deletions

36
config.md Normal file
View File

@@ -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
```

View File

@@ -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)
![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)

10
debug.md Normal file
View File

@@ -0,0 +1,10 @@
### Debug 相關指令
- 開啟GIT追蹤
```sh
set GIT_TRACE=1
```
- 開啟Git Credential Manager for Windows 追蹤
```sh
set GCM_TRACE=1
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB