使用git的push到github上每次都要输入用户名和密码
2018-03-10 16:38
603 查看
原文出处: http://blog.csdn.net/wo541075754/article/details/52176688 问题
每次进行代码push的时候都需要输入用户名和密码,效率极低,安全性也无法保证。
删除https方式,添加ssh:
问题
每次进行代码push的时候都需要输入用户名和密码,效率极低,安全性也无法保证。原因
使用了https的方式push代码解决方案
方法一在termail里输入:git remote -v输出:
origin git@github.com:HappySecondBrother/example.git (fetch) origin git@github.com:HappySecondBrother/example.git (push)
删除https方式,添加ssh:
git remote rm origin git remote add origin git@github.com:twlkyao/demo.git git push origin:
[remote "origin"] url = https://github.com/HappySecondBrother/example.git fetch = +refs/heads/*:refs/remotes/origin/*
[remote "origin"] url = git@github.com:HappySecondBrother/example.git fetch = +refs/heads/*:refs/remotes/origin/2方法二修改项目目录下的git/config,执行vi .git/config:
[remote "origin"] url = https://github.com/HappySecondBrother/example.git fetch = +refs/heads/*:refs/remotes/origin/*修改为:
[remote "origin"] url = git@github.com:HappySecondBrother/example.git fetch = +refs/heads/*:refs/remotes/origin/*方法三直接设置新的url
git remote set-url origin git@github.com:HappySecondBrother/example.git
相关文章推荐
- 使用SSH方式免去Git每次push都输入用户名和密码
- Github:每次git push推送的时候都需要输入git的用户名和密码
- 使用git提交到github,每次都要输入用户名和密码的解决方法
- git使用push或者pull命令每次都需要输入用户名和密码?
- git命令行pull,push解决每次都输入用户名密码
- git命令每次提交都要输入用户名和密码的解决办法(git push origin master)
- push代码到github时,每次都要输入用户名和密码的问题
- git每次pull/push到gitHub都要输入密码的解决方案
- git push的时候每次都要输入用户名和密码的问题解决
- 解决git push 时每次都需要输入用户名和密码
- push到github时,每次都要输入用户名和密码的问题
- github常遇问题 push到github时,每次都要输入用户名和密码的问题
- git 提交到github时不用每次都输入用户名,密码
- git push命令每次都要输入用户名和密码的问题处理
- Git连接github不用每次输入用户名和密码的方法
- git push 每次都需要输入用户名和密码
- github每次push代码时都要输入用户名和密码的解决方法
- git push 每次都需要输入用户名和密码 TortoiseGit 不用每次输入用户名和密码的方法
- Git连接github不用每次输入用户名和密码的方法
- push到github时,每次都要输入用户名和密码的问题