Editing project.config file of All-Projects

337 views
Skip to first unread message

Amal Babu S

unread,
Mar 23, 2023, 12:48:32 AM3/23/23
to Repo and Gerrit Discussion
Hi all,

I am quite new to gerrit.
I need to add a new submit requirement in gerrit 3.7.0. I came to know that we can  achieve it by adding a new label  in project.config file of All-projects. But i don't know how to edit the project.config file.

If there is any other method of adding submit requirement, please advice.

Regards,
Amal

Fabio Ponciroli

unread,
Mar 23, 2023, 4:14:03 AM3/23/23
to Amal Babu S, Repo and Gerrit Discussion
Hi Amal,
you can do it from the UI by browsing to this URL <$GERRIT_SITE>/admin/repos/All-Projects,commands, click on "Edit Repo Config" and edit online your file. 

Alternatively, you can do it from the command line:
1. clone  All-Projects
2. git fetch origin refs/meta/config && git checkout FETCH_HEAD
2. modify the project.config
3. git add . && git commit -m'your commit description'
4. git push origin HEAD:refs/for/refs/meta/config
5. review your change and merge it (if you want to skip the review you can push it this way "git push origin HEAD:refs/meta/config")

HTH,
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/eb3ffeec-bb12-4b3a-95fd-007ddabd5355n%40googlegroups.com.

Matthias Sohn

unread,
Mar 23, 2023, 4:17:10 AM3/23/23
to Amal Babu S, Repo and Gerrit Discussion
On Thu, Mar 23, 2023 at 5:48 AM Amal Babu S <amalb...@gmail.com> wrote:
Hi all,

I am quite new to gerrit.
I need to add a new submit requirement in gerrit 3.7.0. I came to know that we can  achieve it by adding a new label  in project.config file of All-projects. But i don't know how to edit the project.config file.

If there is any other method of adding submit requirement, please advice.

Regards,
Amal

--

Sven Selberg

unread,
Mar 23, 2023, 4:45:49 AM3/23/23
to Repo and Gerrit Discussion
On Thursday, March 23, 2023 at 9:17:10 AM UTC+1 Matthias Sohn wrote:
On Thu, Mar 23, 2023 at 5:48 AM Amal Babu S <amalb...@gmail.com> wrote:
Hi all,

I am quite new to gerrit.
I need to add a new submit requirement in gerrit 3.7.0. I came to know that we can  achieve it by adding a new label  in project.config file of All-projects. But i don't know how to edit the project.config file.


Alternatively from the UI:
1. Browse -> Projects , query for All-Projects
2. Select All-Projects
3. Commands -> Edit Repo Config, to open an online edit for the project.config file.
4. #Edit
5. Save & Publish

Amal Babu S

unread,
Mar 23, 2023, 5:10:14 AM3/23/23
to Sven Selberg, matthi...@gmail.com, pon...@gmail.com, Repo and Gerrit Discussion
Hi all,
Thank you for all your advice.

I have tried to edit in the UI with my administrator account. It shows "you lack forge author" permission.
image.png


When I try to add "Forge Author identity" to "refs/*", I am getting the following error.
image.png

Also I have tried cloning All-projects. But when I do git fetch origin refs/meta/config  I am getting an error fatal: couldn't find remote ref refs/meta/config.
My All-Projects have the following branches

image.png


Any help is much appreciated.

Regards
Amal.

You received this message because you are subscribed to a topic in the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/repo-discuss/wlCu-dC9U6Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/cf5dcb8a-d7a8-4914-b494-e2b2872ecc1en%40googlegroups.com.

Sven Selberg

unread,
Mar 23, 2023, 6:01:05 AM3/23/23
to Repo and Gerrit Discussion
On Thursday, March 23, 2023 at 10:10:14 AM UTC+1 Amal Babu S wrote:
Hi all,
Thank you for all your advice.

I have tried to edit in the UI with my administrator account. It shows "you lack forge author" permission.
image.png

The key part of the error message is "You have not registered any email adress".
The edit creates a commit, and in order to create a commit there needs to be an author and a committer, both of which require name and email:
"John Johnnysson <joh...@soncorp.com>".

If you follow the suggestions in the error message and add an email to your account Gerrit can create the commit and you will be able to Edit.

Amal Babu S

unread,
Mar 23, 2023, 6:11:05 AM3/23/23
to Repo and Gerrit Discussion
Hi sven,

Will try adding email address. Users in my gerrit comes from github.com via github plugin.
But I am able to commit to other repositories with out adding email. Even I have provided access to other users in my repository by creating " forge committer identity" permission for them.

Regards
Amal

Amal Babu S

unread,
Mar 31, 2023, 1:55:04 AM3/31/23
to Repo and Gerrit Discussion

Hello Sven Selberg,

Issue has been fixed once I have added the email.

Thanks a lot for the insights

Best Regards
Amal Babu S
Reply all
Reply to author
Forward
0 new messages