Git远程服务器推送失败 [英] Git remote server Push fails

查看:165
本文介绍了Git远程服务器推送失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从远程服务器克隆Git仓库后,我在本地副本上进行了一些更改。我想推送这些更改回到远程服务器,但我收到一条错误消息,不会产生有用的信息:

  fatal:读取错误:无效参数

(ps。服务器和本地仓库都在运行在Windows环境中)



我试过了:

  git push 
git push origin $ b $ git push origin master

通过GUI版本GIT产生相同的有用错误信息。

编辑
设置环境变量GIT_TRACE = 1后,

  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'
推送到git://MYSERVER.MYCOMPANY.net/repo
致命错误:读取错误:无效参数

有什么想法?

解决方案

看起来像是在简单的cmd.exe终端中运行,而不是msysgit的bash终端。很多git依赖于shell脚本;因此,您需要运行在bash终端而不是cmd.exe。


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?

解决方案

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.

这篇关于Git远程服务器推送失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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