push代码到github每次输入用户名和密码
来源:互联网 发布:游戏模型设计软件 编辑:程序博客网 时间:2024/05/18 22:12
转载于:http://blog.csdn.net/wo541075754/article/details/52176688#
目录
问题
每次进行代码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 origingit remote add origin git@github.com:twlkyao/demo.gitgit push origin
方法二
修改项目目录下的git/config,执行vi .git/config
:
[remote "origin"]url = https://github.com/HappySecondBrother/example.gitfetch = +refs/heads/*:refs/remotes/origin/*
修改为:
[remote "origin"]url = git@github.com:HappySecondBrother/example.gitfetch = +refs/heads/*:refs/remotes/origin/*
方法三
直接设置新的url
git remote set-url origin git@github.com:HappySecondBrother/example.git
0 0
- push代码到github每次输入用户名和密码
- push代码到github每次输入用户名和密码
- 【GitHub】解决每次push代码到github都需要输入用户名和密码的方法
- push代码到github时,每次都要输入用户名和密码的问题
- push代码到Github免输入用户名和密码
- push到github时,每次都要输入用户名和密码的问题
- push到github时,每次都要输入用户名和密码的问题
- push到github时,每次都要输入用户名和密码的问题
- push到github时,每次都要输入用户名和密码的问题
- push到github时,每次都要输入用户名和密码的问题
- push到github时,每次都要输入用户名和密码的问题
- github每次push代码时都要输入用户名和密码的解决方法
- 每次git push到远程库都要输入用户名和密码?
- github常遇问题 push到github时,每次都要输入用户名和密码的问题
- push代码到github省略用户名和密码
- Github:每次git push推送的时候都需要输入git的用户名和密码
- TortoiseGit 远程上传push代码,配置不用每次输入用户名和密码方法
- 设置Git不需要每次push都输入用户名和密码
- 继续修复css3动画一处小bug
- 3000fps算法整理
- VS2012 代码文本编辑常用快捷键-助记
- MySql数据库函数与子查询和连接查询(3)
- android工程导入自己生成的jar包时报:Could not find class referenced from method
- push代码到github每次输入用户名和密码
- 【HDU 5997】 rausen loves cakes 【启发式合并+线段树】
- JS中日期格式化的方法
- c# 显示图像,删除图像
- windows系统下GCC的安装与配置
- 设置Winform控件层级关系
- 经验教训:Windows环境下开发的第一要点
- Java GC日志查看
- Docker学习