我有运行的gerrit服务器和连接到此服务器的git存储库。
我可以从这个gerrit服务器签出并获取位于git存储库中的源代码。但是当我尝试提交一些更改并将它们提交给Git存储库时,似乎这些更改不会被推送到git存储库。
我编辑了replication.config
这样的文件:
[remote "Main"]
url = https://portal-ua.tms.com/git/${name}.git/
push = +refs/heads/*:refs/heads/*
push = +refs/tags/*:refs/tags/*
可能是什么问题? 在日志中我得到以下错误:
org.eclipse.jgit.errors.NotSupportedException: remote does not support smart HTTP push
at org.eclipse.jgit.transport.TransportHttp.openPush(TransportHttp.java:378)
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:130)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1120)
at com.google.gerrit.server.git.PushOp.pushVia(PushOp.java:281)
at com.google.gerrit.server.git.PushOp.runImpl(PushOp.java:226)
at com.google.gerrit.server.git.PushOp.runPushOperation(PushOp.java:179)
at com.google.gerrit.server.git.PushOp.run(PushOp.java:161)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:333)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
是否有可能通过http从gerrit推送到git repo? 提前谢谢你。
答案 0 :(得分:0)
我没有成功通过http但是通过ssh它可以使用当前命令:
ssh -p 29418 gerrit review --project $ GERRIT_PROJECT --submit $ GERRIT_CHANGE_NUMBER,$ GERRIT_PATCHSET_NUMBER