Git 使用credential.helper幫助免輸入帳密即可與GitHub連接

ss
1 min readSep 25, 2018

--

分享一個小東西, 每次使用git commit完後總會有個小習慣想要push 到GitHub, 但是每次都又輸入帳號密碼實在是很困擾, 然後想到mac OS的git 都不用輸入他自己會去紀錄, 覺得在linux 的系統下一定也可以做到

只需要在git config中加入點東西即可, 就是這個credential.helper

在termial 中下

git config — global credential.helper ‘cache — timeout 7200’

在7200秒之內, 都可以不用在輸入帳號密碼了,你也可以輸入更長的時間, 當然, 第一次執行還是要輸入帳密,畢竟要紀錄下來

如果要直接存下來, 用

git config — global credential.helper store

來幫助你

--

--

ss
ss

No responses yet