2

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?

J T
  • 4,946
  • 5
  • 28
  • 38

2 Answers2

2

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.

splicer
  • 5,344
  • 4
  • 42
  • 47
0

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 ?

peter karasev
  • 2,578
  • 1
  • 28
  • 38
  • Home brew. "git.exe daemon --verbose --export-all --base-path=C:". Is running as a service on Windows 2003. This worked beautifully for "git clone", "git pull" so far. Its just the "git push" that fails with the error message. – J T Apr 14 '11 at 20:14
  • git-daemon does not support write access by default. I believe it can be enabled but since it has no support for authentication it is not recommended. – Arrowmaster Apr 15 '11 at 00:05
  • @Arrowmaster: so how does one setup a repo for people to push to? – J T Apr 18 '11 at 16:53