NOTE to the denizens of this list: do any of you have any ideas?
I have no clue what's going on; read below.
On Tue, Feb 04, 2020 at 06:11:47PM +0100, Daniel Dietsch wrote:
> Push URL: ssh://git@localhost/my-repo.git
> # git push
> FATAL: unknown git/gitolite command: 'git receive-pack '/my-repo.git''
> fatal: Could not read from remote repository.
> But, if I push directly to the URL, i.e. with
> git push ssh://git@localhost/my-repo.git master:master
> everything works.
> Looking into the gitolite logs for both pushes shows the following:
[...]
> Note that the first case tries to use
> git receive-pack
> and the second uses
> git-receive-pack
>
> Does anybody knows how I can fix this?
I tried several different ways, and I cannot reproduce this
behaviour (i.e., make my git client call out "git receive-pack"
instead of "git-receive-pack")
Could you try this:
- add something like this to you ~/.ssh/config
host mygit
user git
hostname localhost
- make a fresh clone by running:
git clone mygit:my-repo.git
- cd my-repo, make some changes, commit, and try push.
TBH, I'm grasping at straws here; I have no idea why (or, more
to the point, *under what conditions*) the git client would
choose to do this.
sitaram