[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Push not permitted issue, SOLVED

I managed to track this down using the debugger. It turned out to be a user name confusion. The SSHPushConnection picked the user from the .gitconfig file and I had that configured incorrectly so that although the URL and SSH credentials were correct, the push was made on behalf of the wrong user.

A request here would be to propagate the actual problem that is reported by the receive-pack command. It clearly stated that the command was not permitted for the given user (I saw that by looking at the MessageWriter that receives the output). That information would have been very helpful but as it works right now, it's lost.

Thomas Hallgren

On 2011-09-20 16:10, Thomas Hallgren wrote:

I'm getting an error that seems to be intermittent. Sometimes a push will succeed and sometimes it just fails with the stack trace below. Stepping through it, I can see that a fetch succeeds and is able to read the advertised refs, but the subsequent push fails. What could it be that I do wrong here? The push configuration seems to be correct (and I'm able to push from the command line). I'm a bit at loss here so any help would be greatly appreciated.

Kind Regards,
Thomas Hallgren

Caused by: org.eclipse.jgit.errors.TransportException: git@xxxxxxxxxx:thallgren/tada-test.git: push not permitted
    at org.eclipse.jgit.transport.BasePackPushConnection.noRepository(BasePackPushConnection.java:149)
    at org.eclipse.jgit.transport.BasePackConnection.readAdvertisedRefsImpl(BasePackConnection.java:198)
    at org.eclipse.jgit.transport.BasePackConnection.readAdvertisedRefs(BasePackConnection.java:176)
    at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:327)
    at org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:152)
    at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:130)
    at org.eclipse.jgit.transport.Transport.push(Transport.java:1120)
    at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:159)

jgit-dev mailing list