git http拉取代碼免賬號密碼


git http拉取代碼免賬號密碼

方法一:

通過生成credential配置

git config --global credential.helper store  

查看.gitconfig文件,發現多了一行

[credential]
    helper = store

方法二

修改倉庫中.git/config文件

url = http://賬號:密碼@git.test.com.cn/root/xx.git

或者帶着賬號密碼去克隆代碼

git clone http://賬號:密碼@git.test.com.cn/root/xx.git

方法三

直接修改.gitconfig配置文件,加入password = xxx

window目錄: C:\Users\Administrator/.gitconfig

linux目錄: ~/.gitconfig

[user]
	name = xxx
	email = xxx@xx.com
	password = xxx

其他說明

1.關閉https證書,去掉ssl認證

git config --global http.sslVerify false

2.git ssh轉http方式

git clone項目后,只需將.git/config文件中
url = http://xxx.com/Name/project.git
改為
url = git@xxx.com/Name/project.git


免責聲明!

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



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