gitea: Jenkins Gitea-Plugin: Cannot scan private repositories

  • Gitea version (or commit ref): 1.4.0
  • Git version: 2.17
  • Operating system: Alpine Linux 3.7.0 virt-hardened
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

Hi, I have a problem with the Gitea-Jekins Plugin. https://github.com/jenkinsci/gitea-plugin

It can only scan public projects of any organization. I have a JenkinsCI user on my Gitea Instance which is Member of the Owner Group of the Organization.

In Jenkins i use the Credentials of the JenkinsCI user and the Scan runs successful - but reports “0 repositories found”. Without the credentials of the JenkinsCI user, i get HTTP 401 from Gitea - as expected. But for some reason, i need to make a repository public to be visible to the repository scanning… which is bad for internal projects…

Is there any way to workaround this behaviour? The GitHub Repo of the Plugin itself doesn’t have Issues activated, sadly.

Gitea Organization Scan Log:

[Sun Apr 22 15:20:10 CEST 2018] Starting organization scan… [Sun Apr 22 15:20:10 CEST 2018] Updating actions… [Sun Apr 22 15:20:11 CEST 2018] Consulting Gitea Organization

Checking repositories…

0 repositories were processed [Sun Apr 22 15:20:11 CEST 2018] Finished organization scan. Scan took 0.63 sec Finished: SUCCESS

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 17 (3 by maintainers)

Commits related to this issue

Most upvoted comments

After looking for help on the discord server, I’ve found a solution. AND I am sure now, this is a bug related to Gitea itself.

The scanning works if i set the Jenkins User as Gitea Admin. So it is something about the privileges when getting the repositories of an organization.

The Jenkins User is in the Owner group of the Organization, so it actually should work without giving it global admin rights.