因为我很少在项目中使用Github,所以当我想要推送提交时,我会遇到一个问题。
首先,我创建了一个存储库。然后,我已经克隆了这个分支(使用命令行git clone https://github.com/ ...
),并且在进行修改之后,我成功地提交了(git commit -a
)。
在此之后,我尝试使用命令行git push
推送提交,但获得了以下错误:
fatal: could not read Username for 'https://github.com': No such file or directory
你有解决这个问题的主意吗?
发布于 2014-01-02 02:38:10
我要做的是:
git remote rm origin
git remote add origin 'git@github.com:username/repo.git'
然后,我可以推送我的更改。
发布于 2014-01-21 02:21:52
我试着听从命令,它对我很管用
git push https://<username>:<password>@github.com/<username>/<repository-name>
发布于 2014-01-13 01:57:34
因为它是1.8.5版本错误,如果你不想使用SSH,你可以从here降级到1.84,或者升级到更高的版本,比如1.9.x。
https://stackoverflow.com/questions/20871549
复制相似问题