Page MenuHomePhabricator

Clone command specified in gittiles doesn't work in most cases
Closed, DuplicatePublic

Description

At https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/skins/MinervaNeue/ the page advises us to use git clone ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue.

Actual Result

This command will only work if and only if the gerrit username of the user is the same as the name of the user they are currently logged in as inside their computer.

Expected Result

The command should be like git clone https://gerrit.wikimedia.org/r/path/to/repo when no user is logged in and should be something like git clone ssh://<gerrit username>@gerrit.wikimedia.org:29418/path/to/repo if a user is logged in.

Event Timeline

hashar added a project: Upstream.
hashar subscribed.

I guess we just assume that people have some local ssh config to set the appropriate username:

~/.ssh/config
Host gerrit.wikimedia.org, *.wmflabs.org
    User <gerrit username>

The Gerrit plugin for gitiles crafts the URL after the ssh address in the Gerrit configuration:

[sshd]
    listenAddress = gerrit.wikimedia.org:29418

And the code does not seem to support inserting the username.

The feature request can be filed upstream at https://bugs.chromium.org/p/gerrit/issues/entry requesting an enhancement to the gitiles plugin.

It seems Google's own instance does advertise https:

https://android.googlesource.com/kernel/common/

Clone this repo:
git clone https://android.googlesource.com/kernel/common

Perhaps it is already configurable?

They disabled ssh @Krinkle. As in they don't allow ssh so i think gitiles picks that up so shows https.