| Summary: | Push from JGit->JGit "push not permitted" | ||
|---|---|---|---|
| Product: | [Technology] JGit | Reporter: | Roland Schulz <roland> |
| Component: | JGit | Assignee: | Project Inbox <jgit.core-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | caniszczyk, sop |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Roland Schulz
(In reply to comment #0) > But if I try to push from JGit to JGit using > sh org.eclipse.jgit.pgm-0.10.1.sh push --receive-pack "sh > org.eclipse.jgit.pgm-0.10.1.sh receive-pack" host:path ref The problem is JGit's LocalTransport spawn() method doesn't split the getReceivePack() option string. It is passing the entire string as-is as the program to execute. And of course you do not have a program called "sh<space>org.eclipse.jgit.pgm-0.10.1.sh" in your $PATH, so this fails. CGit must be passing this string through the local shell with sh -c, so we need to fix JGit to do the same. I've uploaded http://egit.eclipse.org/r/2416 as a possible fix. (In reply to comment #1) > (In reply to comment #0) > > But if I try to push from JGit to JGit using > > sh org.eclipse.jgit.pgm-0.10.1.sh push --receive-pack "sh > > org.eclipse.jgit.pgm-0.10.1.sh receive-pack" host:path ref > > The problem is JGit's LocalTransport spawn() method doesn't split the > getReceivePack() option string. It is passing the entire string as-is as the > program to execute. And of course you do not have a program called > "sh<space>org.eclipse.jgit.pgm-0.10.1.sh" in your $PATH, so this fails. > > CGit must be passing this string through the local shell with sh -c, so we need > to fix JGit to do the same. > > I've uploaded http://egit.eclipse.org/r/2416 as a possible fix. This fixes it for local push. It still doesn't work for push over SSH. Fixed in stable-0.11, will be part of the release when we ship next week. (In reply to comment #3) > Fixed in stable-0.11, will be part of the release when we ship next week. As already wrote in comment #2: this only fixes it for the local transport. Thus jgit.sh push --receive-pack "jgit.sh receive-pack" $HOME/g2 master is fixed in stable-0.11. But jgit.sh push --receive-pack "jgit.sh receive-pack" localhost:g2 master still doesn't work. Change http://egit.eclipse.org/r/2435 resolves this for SSH. |