I checked the source code, and can set the download coomand using:gitdir=$(git rev-parse --git-dir); scp -p -P %d %s@%s:hooks/commit-msg ${gitdir}/hooks/"But how can I get the username and website in the gerrit.config? are there environmentvariables I can use?One more thing, Is this a bug? For every choice in the download page,like"ANONYMOUSE HTTP", "HTTP", "SSH", all the commit-msg downloading commandis curl, no ssh.
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/0d4fe503-b344-4734-b2ba-be79daf7413an%40googlegroups.com.
On Thu, Jun 8, 2023 at 9:34 AM Yingchun Li <sword.l...@gmail.com> wrote:Please avoid top posting on this list, use interleaved style [1] instead which is easier to followthe conversation thread.
I checked the source code, and can set the download coomand using:gitdir=$(git rev-parse --git-dir); scp -p -P %d %s@%s:hooks/commit-msg ${gitdir}/hooks/"But how can I get the username and website in the gerrit.config? are there environmentvariables I can use?One more thing, Is this a bug? For every choice in the download page,like"ANONYMOUSE HTTP", "HTTP", "SSH", all the commit-msg downloading commandis curl, no ssh.This was changed here https://gerrit-review.googlesource.com/c/plugins/download-commands/+/359823to get rid of issues with diverse versions of openssh.I think downloading the hook script shouldn't require authentication.Which authentication method do you use?
On Friday, June 9, 2023 at 12:37:43 AM UTC+8 Matthias Sohn wrote:On Thu, Jun 8, 2023 at 9:34 AM Yingchun Li <sword.l...@gmail.com> wrote:Please avoid top posting on this list, use interleaved style [1] instead which is easier to followthe conversation thread.OK, Sorry for that .I checked the source code, and can set the download coomand using:gitdir=$(git rev-parse --git-dir); scp -p -P %d %s@%s:hooks/commit-msg ${gitdir}/hooks/"But how can I get the username and website in the gerrit.config? are there environmentvariables I can use?One more thing, Is this a bug? For every choice in the download page,like"ANONYMOUSE HTTP", "HTTP", "SSH", all the commit-msg downloading commandis curl, no ssh.This was changed here https://gerrit-review.googlesource.com/c/plugins/download-commands/+/359823to get rid of issues with diverse versions of openssh.I think downloading the hook script shouldn't require authentication.Which authentication method do you use?We just use the http, and behind of a nginx reverse proxy.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/262ba56e-30ae-4a27-87e3-319567c2f7d4n%40googlegroups.com.
On Fri, Jun 9, 2023 at 4:39 AM Yingchun Li <sword.l...@gmail.com> wrote:On Friday, June 9, 2023 at 12:37:43 AM UTC+8 Matthias Sohn wrote:On Thu, Jun 8, 2023 at 9:34 AM Yingchun Li <sword.l...@gmail.com> wrote:Please avoid top posting on this list, use interleaved style [1] instead which is easier to followthe conversation thread.OK, Sorry for that .I checked the source code, and can set the download coomand using:gitdir=$(git rev-parse --git-dir); scp -p -P %d %s@%s:hooks/commit-msg ${gitdir}/hooks/"But how can I get the username and website in the gerrit.config? are there environmentvariables I can use?One more thing, Is this a bug? For every choice in the download page,like"ANONYMOUSE HTTP", "HTTP", "SSH", all the commit-msg downloading commandis curl, no ssh.This was changed here https://gerrit-review.googlesource.com/c/plugins/download-commands/+/359823to get rid of issues with diverse versions of openssh.I think downloading the hook script shouldn't require authentication.Which authentication method do you use?We just use the http, and behind of a nginx reverse proxy.I'd try to configure the reverse proxy to not require authentication for the URL used to download hooks.