Gtiles setting in gerrit-review.googlesource.com

313 views
Skip to first unread message

pon...@gmail.com

unread,
Mar 10, 2023, 7:02:02 AM3/10/23
to Repo and Gerrit Discussion
Hi,
in gerrit-review.googlesource.com only git operations over HTTPS are enabled.
Accordingly, when browsing a repo using the Gitiles plugin, for example [1], the url suggested for the clone command is over HTTPS only.

Is there any Gitiles or Gerrit setting to achieve it?

It seems like a vanilla Gerrit installation by default displays a git clone over SSH in the Gitiles homepage of the project. 

I tried playing with the Gitiles setting in the URL section [2] but was unsuccessful.

Do you know how to achieve the same behaviour as gerrit-review.googlesource.com?

Thanks,
Ponch

Matthias Sohn

unread,
Mar 10, 2023, 9:51:54 AM3/10/23
to pon...@gmail.com, Repo and Gerrit Discussion
On Fri, Mar 10, 2023 at 1:02 PM pon...@gmail.com <pon...@gmail.com> wrote:
Hi,
in gerrit-review.googlesource.com only git operations over HTTPS are enabled.
Accordingly, when browsing a repo using the Gitiles plugin, for example [1], the url suggested for the clone command is over HTTPS only.

Is there any Gitiles or Gerrit setting to achieve it?

It seems like a vanilla Gerrit installation by default displays a git clone over SSH in the Gitiles homepage of the project. 

I tried playing with the Gitiles setting in the URL section [2] but was unsuccessful.

Do you know how to achieve the same behaviour as gerrit-review.googlesource.com?

Did you remove download.scheme = ssh from gerrit.config ?
Did you disable sshd by setting sshd.listenAdress = off ?

--
--
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/c3ca3839-1c80-4055-89ff-bb1b059d8fd5n%40googlegroups.com.

Fabio Ponciroli

unread,
Mar 10, 2023, 11:24:30 AM3/10/23
to Matthias Sohn, Repo and Gerrit Discussion
Hi Matthias,


On Fri, 10 Mar 2023 at 15:51, Matthias Sohn <matthi...@gmail.com> wrote:
On Fri, Mar 10, 2023 at 1:02 PM pon...@gmail.com <pon...@gmail.com> wrote:
Hi,
in gerrit-review.googlesource.com only git operations over HTTPS are enabled.
Accordingly, when browsing a repo using the Gitiles plugin, for example [1], the url suggested for the clone command is over HTTPS only.

Is there any Gitiles or Gerrit setting to achieve it?

It seems like a vanilla Gerrit installation by default displays a git clone over SSH in the Gitiles homepage of the project. 

I tried playing with the Gitiles setting in the URL section [2] but was unsuccessful.

Do you know how to achieve the same behaviour as gerrit-review.googlesource.com?

Did you remove download.scheme = ssh from gerrit.config ?

Yes
 
Did you disable sshd by setting sshd.listenAdress = off ?

I can't disable this in my case, however, digging further in the code I found this undocumented setting: gerrit.cloneUrlType

Adding the following in my configuration did the trick:

> cat etc/gitiles.config
[gerrit]
  cloneUrlType = http

I will amend the documentation accordingly.

Thanks .
Ponch

Adrià Vilanova Martínez

unread,
Mar 11, 2023, 8:31:30 PM3/11/23
to Repo and Gerrit Discussion
Hi!

On Friday, March 10, 2023 at 5:24:30 PM UTC+1 Fabio Ponciroli wrote:
Hi Matthias,


On Fri, 10 Mar 2023 at 15:51, Matthias Sohn <matthi...@gmail.com> wrote:
On Fri, Mar 10, 2023 at 1:02 PM pon...@gmail.com <pon...@gmail.com> wrote:
Hi,
in gerrit-review.googlesource.com only git operations over HTTPS are enabled.
Accordingly, when browsing a repo using the Gitiles plugin, for example [1], the url suggested for the clone command is over HTTPS only.

Is there any Gitiles or Gerrit setting to achieve it?

It seems like a vanilla Gerrit installation by default displays a git clone over SSH in the Gitiles homepage of the project. 

I tried playing with the Gitiles setting in the URL section [2] but was unsuccessful.

Do you know how to achieve the same behaviour as gerrit-review.googlesource.com?

Did you remove download.scheme = ssh from gerrit.config ?

Yes
 
Did you disable sshd by setting sshd.listenAdress = off ?

I can't disable this in my case, however, digging further in the code I found this undocumented setting: gerrit.cloneUrlType

Adding the following in my configuration did the trick:

> cat etc/gitiles.config
[gerrit]
  cloneUrlType = http

Thanks for the tip Fabio! I also wanted to show HTTP URLs instead of SSH ones because for anonymous users HTTP URLs are better than SSH ones (the first one allows everyone to clone the repository without authenticating).
 
I will amend the documentation accordingly.

As for the documentation, I see it's already documented in the plugins/gitiles repo: https://gerrit.googlesource.com/plugins/gitiles/+/12e26b3/src/main/resources/+Documentation/config.md

Thanks .
Ponch 

Cheers :-)

Fabio Ponciroli

unread,
Mar 13, 2023, 4:43:00 AM3/13/23
to Adrià Vilanova Martínez, Repo and Gerrit Discussion
Hi Adrià,

On Sun, 12 Mar 2023 at 02:31, Adrià Vilanova Martínez <jocde...@gmail.com> wrote:
Hi!

On Friday, March 10, 2023 at 5:24:30 PM UTC+1 Fabio Ponciroli wrote:
Hi Matthias,


On Fri, 10 Mar 2023 at 15:51, Matthias Sohn <matthi...@gmail.com> wrote:
On Fri, Mar 10, 2023 at 1:02 PM pon...@gmail.com <pon...@gmail.com> wrote:
Hi,
in gerrit-review.googlesource.com only git operations over HTTPS are enabled.
Accordingly, when browsing a repo using the Gitiles plugin, for example [1], the url suggested for the clone command is over HTTPS only.

Is there any Gitiles or Gerrit setting to achieve it?

It seems like a vanilla Gerrit installation by default displays a git clone over SSH in the Gitiles homepage of the project. 

I tried playing with the Gitiles setting in the URL section [2] but was unsuccessful.

Do you know how to achieve the same behaviour as gerrit-review.googlesource.com?

Did you remove download.scheme = ssh from gerrit.config ?

Yes
 
Did you disable sshd by setting sshd.listenAdress = off ?

I can't disable this in my case, however, digging further in the code I found this undocumented setting: gerrit.cloneUrlType

Adding the following in my configuration did the trick:

> cat etc/gitiles.config
[gerrit]
  cloneUrlType = http

Thanks for the tip Fabio! I also wanted to show HTTP URLs instead of SSH ones because for anonymous users HTTP URLs are better than SSH ones (the first one allows everyone to clone the repository without authenticating).
 
I will amend the documentation accordingly.

As for the documentation, I see it's already documented in the plugins/gitiles repo: https://gerrit.googlesource.com/plugins/gitiles/+/12e26b3/src/main/resources/+Documentation/config.md

Thanks for pointing it out...I totally missed it :/ 

Thanks .
Ponch 

Cheers :-)
 

Thanks,
Ponch

--
--
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/c3ca3839-1c80-4055-89ff-bb1b059d8fd5n%40googlegroups.com.

--
--
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.
Reply all
Reply to author
Forward
0 new messages