push代码到Github免输入用户名和密码
2013-12-17 21:15
274 查看
在Github上建立了项目,在每次push代码的时候,都要输入用户名和密码,很麻烦,原因是使用了https方式 push,
在termail里输入:
可以看到形如一下的返回结果
origin https://github.com/twlkyao/demo.git (fetch)
origin https://github.com/twlkyao/demo.git (push)
1.可以先删除https方式的,然后添加ssh方式的。
3.直接设置新的url
在termail里输入:
git remote -v
可以看到形如一下的返回结果
origin https://github.com/twlkyao/demo.git (fetch)
origin https://github.com/twlkyao/demo.git (push)
1.可以先删除https方式的,然后添加ssh方式的。
git remote rm origin git remote add origin git@github.com:twlkyao/demo.git git push origin
2.也可以通过修改项目目录下的.git/config文件完成。
[remote "origin"] url = https://github.com/twlkyao/demo.git fetch = +refs/heads/*:refs/remotes/origin/*
将url处改为ssh地址。
[remote "origin"] url = git@github.com/twlkyao/demo.git fetch = +refs/heads/*:refs/remotes/origin/*
3.直接设置新的url
git remote set-url origin git@github.com:twlkyao/demo.git
相关文章推荐
- 【GitHub】解决每次push代码到github都需要输入用户名和密码的方法
- github每次push代码时都要输入用户名和密码的解决方法
- push代码到github时,每次都要输入用户名和密码的问题
- push代码到github每次输入用户名和密码
- push代码到github每次输入用户名和密码
- push代码到github每次输入用户名和密码
- push代码到github时,每次都要输入用户名和密码的问题
- push到github时,每次都要输入用户名和密码的问题
- push到github时,每次都要输入用户名和密码的问题
- Github:每次git push推送的时候都需要输入git的用户名和密码
- 解决`向github提交代码是老要输入用户名密码`的问题
- github提交代码避免输入用户名和密码的方法总结
- 向github push代码时免重复输入密码的方法
- github常遇问题 push到github时,每次都要输入用户名和密码的问题
- TortoiseGit 远程上传push代码,配置不用每次输入用户名和密码方法
- push代码到github省略用户名和密码
- push到github时,每次都要输入用户名和密码的问题
- push到github时,每次都要输入用户名和密码的问题
- push到github时,每次都要输入用户名和密码的问题
- 在使用Git push或pull代码的时候,总是要输入用户名和密码的问题