Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a project to the gerrit code review tool?

Tags:

git

gerrit

How do I manually add a project to the gerrit code review tool?

I've seen some examples that execute a gerrit binary but my installation doesn't appear to have one of these.

like image 966
rich Avatar asked Jan 22 '11 11:01

rich


People also ask

How do I add a project to Gerrit?

There are several ways to create a new project in Gerrit: in the Web UI under 'Projects' > 'Create Project' via the Create Project REST endpoint. via the create-project SSH command.


2 Answers

For older Gerrit versions, you need to use the ssh interface. Set up your public key in the web interface then run:

ssh -p <port> <user>@<gerrit-host> gerrit --help

This will list you the available commands. What you actually need to run to create your project is:

ssh -p <port> <user>@<gerrit-host> gerrit create-project -n <project-name>

In Gerrit 2.3 and newer, you may alternatively create projects from the UI, by going to Admin->Projects->Create New Project.

like image 106
Andrew Aylett Avatar answered Sep 22 '22 23:09

Andrew Aylett


From gerrit 2.3.x, if you are in Administrator, you can create the project in the web as well.

It is visible under Admin/Projects if you have permission.

like image 38
Larry Cai Avatar answered Sep 19 '22 23:09

Larry Cai