无法将文件推送到远程Git存储库

时间:2014-03-01 05:47:29

标签: git github

使用此命令:

$ git push -u ganesh master

我收到此错误:

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

我正在使用Git Bash。我能够提交文件,但无法推送文件。可能是什么问题?

这是$ git remote -v命令的输出:

ganesh  https://github.com/Gauravwagh/hellow-dj.git (fetch)
ganesh  https://github.com/Gauravwagh/hellow-dj.git (push)
origin  https://github.com/Gauravwagh/hellow-dj.git (fetch)
origin  https://github.com/Gauravwagh/hellow-dj.git (push)
ram     https://github.com/Gauravwagh/hellow-dj.git (fetch)
ram     https://github.com/Gauravwagh/hellow-dj.git (push)    

1 个答案:

答案 0 :(得分:0)

假设您正确配置了git,您是否尝试删除原点并再次添加?

请试试这个:

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