跳到主要內容

Windows版 SourceTree 啟用認證暫存的方式

參考文章

SourceTree 是Git的GUI輔助工具
坦白說比起 Command Line ,我還是比較喜歡有GUI的輔助操作介面
特別是看線圖以及一些複合操作我是認為比原生的Git Bash及GUI好用
不過 Windows 版的使用者在一開始大概都會碰到無法登入 Git server 的問題
SourceTree 的認證暫存預設應該是封閉的
如果Git server沒啟用 keyless,那就得開啟認證暫存機制囉

操作步驟為
Win + R 叫出執行後,輸入 cmd 開啟 Windows 的命令提示字元

接著下以下指令

C:\Users\xxx> D:                                 ::切換到SourceTree的安裝硬碟槽,示範是D槽

D:\>cd D:\SubPrograms\sourcetree\tools\putty  :: cd到SourceTree下的 tools\putty目錄

D:\SubPrograms\sourcetree\tools\putty> plink.exe git.yourSite.com
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048......
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n) y  :: 選y啟用機制

login as: yourAccount
yourAccount@git.yourSite.com 's password: xxxxxxx


像這樣登入過後,認證資訊就會存在 sourceTree使用的 Putty裡,操作行為也會都可行了
我之前試過拿網路上的 plink.exe 取代sourceTree Windows版自帶的會有問題
所以建議不要多做其他多餘的處理

留言