推送提交到Github时出错:致命:无法读取用户名 [英] Error when push commits with Github: fatal: could not read Username

查看:124
本文介绍了推送提交到Github时出错:致命:无法读取用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为很少的时候,我使用Github来处理我的项目,而当我想推送提交时,我遇到了一个问题。

一开始,我分叉了一个仓库。然后我克隆了fork(使用命令行 git clone https://github.com/ ... ),并且在修改之后,我已经成功实现了( git commit -a )。



在此之后,我尝试使用命令行 git push 但我得到以下错误:

 致命:无法读取'https ://github.com':没有这样的文件或目录

你有想法解决这个问题吗?问题?

解决方案

我必须做的是: code> git remote rm origin

git remote add origin'git@github.com:username / repo.git'



然后,我可以推送我的更改。


Since few time, I use Github for my projects and I have an issue when I want to push commits.

To beginning, I have forked a repository. Then I have cloned the fork (with command line git clone https://github.com/ ...) and, after doing modifications, I have committed with success (git commit -a).

After this, I have tried to push commits with command line git push but I obtain the following error:

fatal: could not read Username for 'https://github.com': No such file or directory

Have you got an idea to resolve this issue?

解决方案

What I had to do was:

git remote rm origin
git remote add origin 'git@github.com:username/repo.git'

Then, I was able to push my changes.

这篇关于推送提交到Github时出错:致命:无法读取用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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