SSH
配置公钥后,使用的ssh方式获取远程仓库可以免密拉取
其他
方法1:
在.git目录中有个config目录,在路径前配置下用户名和密码即可,如下所示:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = http://账号:'密码'@192.168.99.165:8000/iot2/iot-front-pc.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
soureTree


方法2:
设置对所有项目有效(推荐使用,一行命令搞定)
打开终端并且输入:
git config --global credential.helper osxkeychain
第一次需要输入密码,以后都不需要了
通过配置SSH公钥,可以实现使用Git进行远程仓库操作时免密登录。文章提到了两种方法:一是直接在.git/config文件中添加用户名和密码;二是全局设置Git的credential.helper为osxkeychain,首次输入密码后,后续操作将自动填充,实现免密。
1万+

被折叠的 条评论
为什么被折叠?



