每次使用git拉取代碼時,總需要輸入用戶名,密碼,做以下設(shè)置可記憶用戶名密碼,只需輸入一次,后續(xù)不再輸入。
方法一:
[root@localhost myweb]# git config --global user.name "xxxx@sina.com"
[root@localhost myweb]# git config --global user.password "a123456"
以上設(shè)置完成后,可執(zhí)行:
git config user.name 和 git config user.password 命令查看設(shè)置是否成功。
方法二:文章來源:http://www.zghlxwxcb.cn/news/detail-724845.html
如果方法一不好使,可執(zhí)行以下命令,執(zhí)行后下次拉取時輸入一次用戶名密碼,第二次拉取時就不用再輸入啦。文章來源地址http://www.zghlxwxcb.cn/news/detail-724845.html
git config --global credential.helper store
到了這里,關(guān)于git設(shè)置并記憶用戶名密碼的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!