Gerrit 3.7.0: push --signed gives remote: error: invalid protocol: wanted 'old new ref'

235 views
Skip to first unread message

Pranab Panda

unread,
Feb 4, 2023, 1:29:34 AM2/4/23
to Repo and Gerrit Discussion

 % git commit -S -a -m "Test Commit Signing"

[main cac7a665] Test Commit Signing

 1 file changed, 1 insertion(+)


% git push --signed origin HEAD:refs/for/main

Enumerating objects: 5, done.

Counting objects: 100% (5/5), done.

Delta compression using up to 16 threads

Compressing objects: 100% (3/3), done.

Writing objects: 100% (3/3), 1.42 KiB | 1.42 MiB/s, done.

Total 3 (delta 2), reused 0 (delta 0), pack-reused 0

remote: error: invalid protocol: wanted 'old new ref'

fatal: the remote end hung up unexpectedly

% fatal: internal server error

Error log has

[2023-02-03T22:02:12.603-08:00] [sshd-SshDaemon[a6e0e5f](port=22)-nio2-thread-1] WARN  org.apache.sshd.server.channel.ChannelSession : handleSubsystem(ChannelSession[id=0, recipient=0]-ServerSessionImpl[pranab_panda@/17.11.106.51:56400]) No factories for subsystem: sftp

[2023-02-03T22:05:24.792-08:00] [SSH git-receive-pack /wifi-ci (pranab_panda)] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user pranab_panda account 1000292) during git-receive-pack '/wifi-ci'

org.eclipse.jgit.errors.PackProtocolException: error: invalid protocol: wanted 'old new ref'

        at org.eclipse.jgit.transport.ReceivePack.parseCommand(ReceivePack.java:2257)

        at org.eclipse.jgit.transport.ReceivePack.recvCommands(ReceivePack.java:1368)

        at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:2205)

        at org.eclipse.jgit.transport.ReceivePack.receive(ReceivePack.java:2142)

        at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:98)

        at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:109)

        at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:74)

        at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:491)

        at com.google.gerrit.server.logging.LoggingContextAwareRunnable.run(LoggingContextAwareRunnable.java:113)

        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)

        at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:612)

        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

        at java.base/java.lang.Thread.run(Thread.java:829)


Any suggestions, pointers on what is going on?

thanks

Pranab

Pranab Panda

unread,
Feb 7, 2023, 4:51:45 PM2/7/23
to Repo and Gerrit Discussion
Also we see a red circle with exclamation in the pushed review
with message that
patch set was pushed without a push  certificate
Please help
thanks
Pranab

William

unread,
Feb 7, 2023, 5:36:46 PM2/7/23
to Repo and Gerrit Discussion

am seeing the same

@Sven Selberg @Matthias Sohn @Edwin Kempin - do you know anyone who can guide us on th8is?

Sven Selberg

unread,
Feb 8, 2023, 2:26:37 AM2/8/23
to Repo and Gerrit Discussion
On Tuesday, February 7, 2023 at 11:36:46 PM UTC+1 William wrote:

am seeing the same

@Sven Selberg @Matthias Sohn @Edwin Kempin - do you know anyone who can guide us on th8is?

On Tuesday, February 7, 2023 at 1:51:45 PM UTC-8 Pranab Panda wrote:
Also we see a red circle with exclamation in the pushed review
with message that
patch set was pushed without a push  certificate
Please help
thanks
Pranab

On Friday, February 3, 2023 at 10:29:34 PM UTC-8 Pranab Panda wrote:

 % git commit -S -a -m "Test Commit Signing"


Is it the same behavior every time you try to do a signed push?
Have you enabled signed pushes?
Did this work in previous versions but not since you upgraded to v3.7.0?

Have you opened a support issue[1] in the issue-tracker[2]?

[main cac7a665] Test Commit Signing

 1 file changed, 1 insertion(+)


% git push --signed origin HEAD:refs/for/main

Enumerating objects: 5, done.

Counting objects: 100% (5/5), done.

Delta compression using up to 16 threads

Compressing objects: 100% (3/3), done.

Writing objects: 100% (3/3), 1.42 KiB | 1.42 MiB/s, done.

Total 3 (delta 2), reused 0 (delta 0), pack-reused 0

remote: error: invalid protocol: wanted 'old new ref'

fatal: the remote end hung up unexpectedly

% fatal: internal server error

Error log has

[2023-02-03T22:02:12.603-08:00] [sshd-SshDaemon[a6e0e5f](port=22)-nio2-thread-1] WARN  org.apache.sshd.server.channel.ChannelSession : handleSubsystem(ChannelSession[id=0, recipient=0]-ServerSessionImpl[pranab_panda@/17.11.106.51:56400]) No factories for subsystem: sftp

[2023-02-03T22:05:24.792-08:00] [SSH git-receive-pack /wifi-ci (pranab_panda)] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user pranab_panda account 1000292) during git-receive-pack '/wifi-ci'

org.eclipse.jgit.errors.PackProtocolException: error: invalid protocol: wanted 'old new ref'

        at org.eclipse.jgit.transport.ReceivePack.parseCommand(ReceivePack.java:2257)


If it reliably reproduce it you should be able to debug a push in a dev-instance [3] and check what the command ("line") at ReceivePack.java:2257 [3] actually looks like, this would hopefully give you a clue as to what's happeneing.

William

unread,
Feb 9, 2023, 2:53:37 PM2/9/23
to Repo and Gerrit Discussion
@ Sven Selberg - Does any version of gerrit actually support signed commits? am talking about signed push which is different, this is about verifying signed commits

Pranab Panda

unread,
Feb 9, 2023, 3:01:59 PM2/9/23
to Repo and Gerrit Discussion
On Tuesday, February 7, 2023 at 11:26:37 PM UTC-8 Sven Selberg wrote:
On Tuesday, February 7, 2023 at 11:36:46 PM UTC+1 William wrote:

am seeing the same

@Sven Selberg @Matthias Sohn @Edwin Kempin - do you know anyone who can guide us on th8is?

On Tuesday, February 7, 2023 at 1:51:45 PM UTC-8 Pranab Panda wrote:
Also we see a red circle with exclamation in the pushed review
with message that
patch set was pushed without a push  certificate
Please help
thanks
Pranab

On Friday, February 3, 2023 at 10:29:34 PM UTC-8 Pranab Panda wrote:

 % git commit -S -a -m "Test Commit Signing"


Is it the same behavior every time you try to do a signed push?
Have you enabled signed pushes?
Did this work in previous versions but not since you upgraded to v3.7.0?

Have you opened a support issue[1] in the issue-tracker[2]?

 
Reply all
Reply to author
Forward
0 new messages