github https方式免密码提交代码 在git config 中添加用户名密码

来源:互联网 发布:paperpass查重软件 编辑:程序博客网 时间:2024/06/07 15:58

关于使用ssh的方式大家都应该知道了,官方有详细的文档

下面说一下https克隆的方式免密码提交

  • 使用https的方式克隆代码
  • 查看项目中的配置文件
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那行如下

    即https://username:password@github.com/username/project.git username就是你账号的个性地址
0 0