git記住賬號密碼

2021-08-13 12:10:22 字數 1007 閱讀 9137

涉及到記住密碼的方式,只適用於http(s)方式,記住密碼的幾種方式:

https 方式每次都要輸入密碼,按照如下設定即可輸入一次就不用再手輸入密碼的困擾而且又享受 https 帶來的極速;

按照以下設定記住密碼十五分鐘:

git config --

global credential.helper cache

如果你想自定義記住的時間,可以這樣:

git config credential.helper 'cache

--timeout=3600'

這裡記住的是乙個小時,如需其他時間,請修改3600為你想修改的時間,單位是秒

你也可以設定長期記住密碼:

git

config--

global

credential

.helper

store

或修改倉庫的位址帶上你的賬號密碼

.net/name/project.git

不推薦這種方式。

如果你原本使用的 ssh 位址想更換成 http(s) 位址,可以執行以下命令:

刪除原本的ssh倉庫位址

git remote rm origin
git remote add origin 

.net/username/project.git

正經實用的git教程。

其實我不太推薦這種方式,更便捷的方式是使用ssh,開啟git gui,選擇help,show ssh key。然後把這個公鑰複製到git受信用的列表裡面去,以後就不用管賬號密碼了。轉殖的時候選擇ssh方式。

Git記住賬號密碼

git儲存使用者名稱密碼的方式 1 設定記住密碼 預設15分鐘 git config global credential.helper cache git config credential.helper cache2 如果想自己設定時間,可以這樣做 git config credential.he...

檢視git 賬號密碼和修改git賬號密碼

檢視使用者名稱 git config user.name 檢視密碼 git config user.password 檢視配置資訊 git config list 修改使用者名稱 git config global user.name x 新的使用者名稱 修改密碼git config global ...

linux清除git賬號密碼

通過git,使用http每次操作遠端倉庫,都神煩需要賬號密碼。使用git config global credential.helper store指令,記住賬號密碼之後,後來發現git的賬號被鎖定成第一次輸入的賬號密碼 怎麼改都不行,簡直譁了狗 網上查閱資料!能查詢到就見鬼了 折騰了半天,終於搞定...