国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

git設置用戶名密碼的示例代碼

2024-07-21 02:03:30
字體:
來源:轉載
供稿:網友

git設置用戶名密碼

設置git用戶名/郵箱

git config --global user.name [username]git config --global user.email [email]

但是這個僅僅是設置用戶名密碼,如果你的git 源每次操作需要你輸入用戶名/密碼驗證,你依然需要每次設置,那么該如何辦呢?

git保存用戶名密碼

這里主要是配置一個config項

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

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

echo "[credential]" >> .git/configecho "  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##保存

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

git config查看配置

使用git config --list查看已設配置

feiqianyousadeMacBook-Pro:xt_GTPU yousa$ git config --listcore.excludesfile=/Users/yousa/.gitignore_globaluser.name=Miss-youuser.email=snowfly1993@gmail.comcore.repositoryformatversion=0core.filemode=truecore.bare=falsecore.logallrefupdates=truecore.ignorecase=truecore.precomposeunicode=trueremote.origin.url=https://github.com/Miss-you/xt_GTPU.gitremote.origin.fetch=+refs/heads/*:refs/remotes/origin/*branch.master.remote=originbranch.master.merge=refs/heads/master

到此這篇關于git設置用戶名密碼的示例代碼的文章就介紹到這了,更多相關git 用戶名密碼內容請搜索武林網以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持武林網!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 玉屏| 兴海县| 德阳市| 鸡西市| 光泽县| 竹山县| 旅游| 宜黄县| 崇明县| 宜兰市| 枣强县| 连平县| 乐陵市| 苗栗县| 梨树县| 富宁县| 伊吾县| 临洮县| 宕昌县| 万源市| 哈尔滨市| 漯河市| 荔浦县| 寻乌县| 阿克苏市| 河北区| 洪江市| 固镇县| 江都市| 广安市| 特克斯县| 河北省| 阜南县| 开江县| 阿瓦提县| 广平县| 昌江| 丹阳市| 沾化县| 张掖市| 庐江县|