git保存用戶名密碼


git保存用戶名密碼

這里主要是配置一個config項

有兩個方法,基本上原理都是一樣,都是修改.git/config文件

1.使用如下命令,修改config文件即可保存

echo "[credential]" >> .git/config echo " helper = store" >> .git/config

2.直接修改.git/config文件

在linux/mac下可以直接使用vim工具修改config文件

ubuntu@VM-7-212-ubuntu:~/kernel-code/kernel-netfilter-sample-code$ vim .git/config ##修改成如下 [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = https://github.com/Miss-you/kernel-netfilter-sample-code.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master ##主要是后面這兩行,如果不想保存,則刪除即可 [credential] helper = store ##保存

這樣就可以保存用戶名密碼,不用每次都輸入了!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM