Post Gitilesplugin-2.10 installation in gerrit unable to see Browse option

44 views
Skip to first unread message

Mohan Kumar

unread,
Feb 19, 2018, 4:04:42 AM2/19/18
to Repo and Gerrit Discussion

  My Environment:-


 My Gerrit Version is -2.10.2

  Gitilesplugin-gitiles-stable Version -2.10 - (In Gerrit under Plugin category installed status shows Enabled).


 Problem:

 I have installed Gitiles plugin and restarted my gerrit application service. After gerrit service restart, I am unable to see “Browse” option under Repository Browser category in our gerrit. Whereas I am able  to browse under plugin menu. Means if I can click over installed gitiles plugin, then I am able to browse the repository & branches etc..(A separate link opens in a New-Window [http://our-gerrit-hostname /gerrit/plugins/gitiles/] from here I can browse it). How do I configure link from “Repository Browser” in gerrit itself?


 Gitiles Stable-Plugin I have installed from http://gerrit-ci.gerritforge.com/job/plugin-gitiles-stable-2.10/


 Also I have tried adding below in my gerrit.config file. Still Browse link option not showing in gerrit Web.


 [Gitiles]

        type = custom

        linkname = gitiles

        url = plugins/gitiles/

        revision = ${project}/+/${commit}

        project = ${project}

        branch = ${project}/+/${branch}

        filehistory = ${project}/+log/${branch}/${file}

 

 url = plugins/gitiles/  I tried with url = gerrit/plugins/gitiles/ as well still not working.

 Do I need to configure/enable anything else?

 Any help would be highly appreciated.

David Pursehouse

unread,
Feb 19, 2018, 6:39:54 AM2/19/18
to Mohan Kumar, Repo and Gerrit Discussion
On Mon, Feb 19, 2018 at 6:04 PM Mohan Kumar <moha...@gmail.com> wrote:

  My Environment:-


 My Gerrit Version is -2.10.2

  Gitilesplugin-gitiles-stable Version -2.10 - (In Gerrit under Plugin category installed status shows Enabled).


 Problem:

 I have installed Gitiles plugin and restarted my gerrit application service. After gerrit service restart, I am unable to see “Browse” option under Repository Browser category in our gerrit. Whereas I am able  to browse under plugin menu. Means if I can click over installed gitiles plugin, then I am able to browse the repository & branches etc..(A separate link opens in a New-Window [http://our-gerrit-hostname /gerrit/plugins/gitiles/] from here I can browse it). How do I configure link from “Repository Browser” in gerrit itself?


 Gitiles Stable-Plugin I have installed from http://gerrit-ci.gerritforge.com/job/plugin-gitiles-stable-2.10/


 Also I have tried adding below in my gerrit.config file. Still Browse link option not showing in gerrit Web.


 [Gitiles]


This section should be named "gitweb", not "gitiles".
 

        type = custom

        linkname = gitiles

        url = plugins/gitiles/

        revision = ${project}/+/${commit}

        project = ${project}

        branch = ${project}/+/${branch}

        filehistory = ${project}/+log/${branch}/${file}

 

 url = plugins/gitiles/  I tried with url = gerrit/plugins/gitiles/ as well still not working.

 Do I need to configure/enable anything else?

 Any help would be highly appreciated.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

David Pursehouse

unread,
Feb 19, 2018, 6:42:17 AM2/19/18
to Mohan Kumar, Repo and Gerrit Discussion
On Mon, Feb 19, 2018 at 6:04 PM Mohan Kumar <moha...@gmail.com> wrote:
Given that the section name is wrong, I guess you've configured it manually.  Note that the plugin has an init step that will set up the necessary configuration for you, so you don't need to do it manually.

Looking at the code [1], I can see a couple of options being set that are not included in your config:

- file
- roottree

also the init step is removing the "cgi" and "pathSeparator" settings.

If you fix the section name and it still doesn't work properly, please either run the init and let the plugin configure itself, or adjust your config to make the same settings as in the init code.



As an aside, if you upgrade to Gerrit 2.12 and the corresponding plugin version, it is not necessary to configure it with the gitweb options because it will automatically add weblinks. 

 Any help would be highly appreciated.

--

Mohan Kumar

unread,
Feb 19, 2018, 10:32:36 PM2/19/18
to Repo and Gerrit Discussion

Dear David,

 

Thank you very much for your help, it is working perfectly as expected.

 

I have changed the section in gerrit.config file from "gitiles" to “gitweb”. And also I have added below lines.

 

file = ${project}+${commit}/${file}

roottree = ${project}

 

Now working perfectly without init step.

 

Thanks.

Reply all
Reply to author
Forward
0 new messages