Git免密码提交
http://www.akmumu.com/2015/06/02/360.html
Git 提交
1、git init 2、git add . 3、git commit -m “说明” 4、git remote add origin https://github.com/superbobogithub/xxxx.git 5、git push -u origin master
下面说一下https克隆的方式免密码提交
-
使用https的方式克隆代码
git clone https://github.com/akmumu/google_hosts.git
-
查看项目中的配置文件
vim .git/config
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true [remote “origin”] url = https://github.com/akmumu/google_hosts.git fetch = +refs/heads/:refs/remotes/origin/ [branch “master”] remote = origin merge = refs/heads/master
-
修改remote中的url那行如下
url = https://akmumu:123456@github.com/akmumu/google_hosts.git
即https://username:password@github.com/username/project.git username就是你账号的个性地址
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步