git push 提示输入用户名和密码
2016-07-20 03:07
597 查看
本人由于维护一些项目,经常需要提交代码到github服务器,当某些仓库项目不属于ssh协议时,就会出现
2.在终端下执行
3.可以看到
4.此时再去
git push要求输入用户名和密码的情况,搜了一下给了个解决办法,这里记录一下。
xs@xs-MacBookPro:~/test$ git push origin master Username for 'https://github.com':
Linux下
1.在用户跟目录下~/创建文件
.git-credentials,并打开编辑,输入内容:
https://{username}:{password}@github.com #例如https://X-s:github110@github.com
2.在终端下执行
git config --global credential.helper store
3.可以看到
~/.gitconfig文件,会多了一项:
[credential] helper = store
4.此时再去
push则不用输入账户名和密码了
xs@xs-MacBookPro:~/test$ git push origin master Everything up-to-date
相关文章推荐
- Linux socket 初步
- RPC failed; result=22, HTTP code = 411
- Linux Kernel 4.0 RC5 发布!
- 查看github pages文档的方式
- linux lsof详解
- linux 文件权限
- Linux 执行数学运算
- 10 篇对初学者和专家都有用的 Linux 命令教程
- 使用BAE的基于Web.py的简单博客程序
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- git更新已經刪除的文件
- 运维入门
- 运维提升
- Linux 自检和 SystemTap
- Ubuntu Linux使用体验