push到github时,每次都要输入用户名和密码的问题
2016-05-13 10:04
465 查看
http://blog.csdn.net/yuquan0821/article/details/8210944
在github.com上 建立了一个小项目,可是在每次push 的时候,都要输入用户名和密码,很是麻烦
原因是使用了https方式 push
在termail里边 输入 Git remote -v
可以看到形如一下的返回结果
origin https://github.com/yuquan0821/demo.git (fetch)
origin https://github.com/yuquan0821/demo.git (push)
下面把它换成ssh方式的。
git remote set-url origin git@github.com:USERNAME/REPOSITORY2.git
这样不是更简单
在github.com上 建立了一个小项目,可是在每次push 的时候,都要输入用户名和密码,很是麻烦
原因是使用了https方式 push
在termail里边 输入 Git remote -v
可以看到形如一下的返回结果
origin https://github.com/yuquan0821/demo.git (fetch)
origin https://github.com/yuquan0821/demo.git (push)
下面把它换成ssh方式的。
<span style="font-size:18px;">1. git remote rm origin</span>
<span style="font-size:18px;">2. git remote add origin git@github.com:yuquan0821/demo.git</span>
<span style="font-size:18px;">3. git push origin </span>
git remote set-url origin git@github.com:USERNAME/REPOSITORY2.git
这样不是更简单
相关文章推荐
- Spring @Transactional
- SSH BaseDao代码
- mybatis+spring启动卡死解决方法
- 【C++】int与string的互转
- spring+hibernate:在applicationCOntext.XML中配置C3P0参数说明
- MFC 中解析一个路径
- python在windows系统中打印中文乱码
- Compute Mean Value of Train and Test Dataset of Caltech-256 dataset in matlab code
- Java基础-值传递与地址传递
- 24行代码,让你的网页元素任意放大、缩小、拖拽、移动
- C语言选择排序算法及代码
- Windows上Python3.5安装Scrapy(lxml) 以及与twisted有关错误的解决
- PHP语言 -- 新建流程
- PHP 返回13位时间戳的实现代码
- Java定时调度 Timer类和TimerTask类
- c# Bitmap byte[]互转
- googleNet
- PHP正则表达式教程(基础篇)
- C# Base64编码解码
- C++中的引用(&)