需要没有用户名和密码的github [英] need github without username and password

查看:126
本文介绍了需要没有用户名和密码的github的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想上传一个项目到版本库,但问题是,当我运行命令时:

  $ git push -u origin master 

它显示了以下内容:

 用户名:
密码:
错误:请求的URL在访问https://github.com/sanxelsanto/时返回错误:403 books3.git / info / refs

致命错误:HTTP请求失败

我应该怎么做才能避免这样的错误信息?

解决方案

对于https地址,git将使用curl并将需要一个:

  $ HOME / .netrc 

或(对于Windows)a:

 %HOME%/ _ netrc 
>

(用%HOME%定义到您想要的任何目录: b
$ b

 <$ c $> 首页没有默认定义)
其内容: c> machine github.com
登录< your_githu b_login>
密码< your_github_password>

请参阅 Git - 如何使用 .netrc 文件在窗口保存用户和密码

其他参数详见与github同步(特别是如果你在防火墙后面,需要指定代理)。


I want to upload a project to the repository, but the problem is that, when I run the command:

$ git push -u origin master

It shows me something like the following:

Username: 
Password: 
error: The requested URL returned error: 403 while accessing https://github.com/sanxelsanto/books3.git/info/refs

fatal: HTTP request failed

What should I do to avoid such an error message?

解决方案

For an https address, git will use curl and will need a:

$HOME/.netrc

or (for Windows) a:

%HOME%/_netrc

(with %HOME% defined to any directory you want: HOME isn't defined by default)
Its content:

machine github.com
login <your_github_login>
password <your_github_password>

See "Git - How to use .netrc file on windows to save user and password".
Other parameters are detailed in "Syncing with github" (espacially if you are behind a firewall and need to specify a proxy).

这篇关于需要没有用户名和密码的github的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆