Replicating to a Google Source Repo

57 views
Skip to first unread message

Elad Ishay

unread,
Jun 12, 2017, 11:27:21 AM6/12/17
to Repo and Gerrit Discussion, elad....@alcide.io
Hi,

We are using Google Cloud Source Repositories as our git repo.

Clone url looks like the following (HTTPS only, there is no SSH clone available) : 
https://source.developers.google.com/p/<PROJECT_NAME>/r/<REPO_NAME>

Is it possible to replicate from gerrit to an https git url on Google Cloud Repositories?

replication.config file content:

[remote "git-server"]
  url = https://<MY_USERNAME><MY_PASSWORD>@source.developers.google.com:443/<PROJECT_NAME>/${name}.git

10x!

Shawn Pearce

unread,
Jun 13, 2017, 12:44:33 AM6/13/17
to Elad Ishay, Repo and Gerrit Discussion, elad....@alcide.io
This should work, under some specific conditions. You can specify the username and password inside $gerrit_site/etc/secure.config:

  [remote "git-server"]
    username = ...
    password = ....


You would need to get that username and password from the Cloud Source Repositories console. Its accessible by clicking the Clone button next to a repository name, and selecting "Manually generated credentials". Those credentials are good for any repository the user has access to.

Gerrit supports / in a project name, while Cloud Source Repositories does not permit /. You would need to restrict your project names in Gerrit to the subset that both systems do accept, mostly A-Z, a-z, 0-9, _ and -.

Elad Ishay

unread,
Jun 13, 2017, 5:35:20 AM6/13/17
to Repo and Gerrit Discussion, elad....@gmail.com, elad....@alcide.io
That did it! 
Thanks a lot.
Reply all
Reply to author
Forward
0 new messages