Git remote server Push fails

五迷三道 提交于 2019-12-19 10:29:31

问题


After cloning a Git repo from my remote server, I have committed some changes on my local copy. I'd like to push these changes back to the remote server, but I'm getting an error message that yields no useful information:

fatal: read error: Invalid argument

(Ps. both the server and the local repo are running in Windows environments)

I have tried:

git push
git push origin
git push origin master

A push through the GUI version of GIT yields the same useful error message.

EDIT After setting the Environment variable GIT_TRACE=1, I get slightly more output:

C:\repo>git push --verbose
setup: git_dir: .git
setup: worktree: C:/repo
setup: cwd: C:/repo
setup: prefix: (null)
trace: built-in: git 'push' '--verbose'
Pushing to git://MYSERVER.MYCOMPANY.net/repo
fatal: read error: Invalid argument

Any thoughts?


回答1:


Looks like you're running in a plain cmd.exe terminal instead of msysgit's bash terminal. Much of git relies on shell scripts; thus, you need to run in a bash terminal instead of cmd.exe.




回答2:


Are you sure the server is configured correctly, has your SSH key, etc? Did you home-brew the Git server or is this something like git-hub / assembla ?



来源:https://stackoverflow.com/questions/5668813/git-remote-server-push-fails

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!