-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jenkins Gitea-Plugin: Cannot scan private repositories #3829
Comments
Feeling kinda ignored ._. I don't know where else i could submit my issue, since the Plugin Author deactivated the ability and the Jenkins forums doesn't seem to provide their Issue Track for plugins anymore. |
Sorry about that! I guess most of us aren't really able to help because we've never used Jenkins (with Gitea at least). The fact that this may well not be an issue related to gitea directly does not help. |
I expected quite a lot people using Jenkins. I'm not sure if it may be an issue of Gitea itself, too - i don't know the API (yet). |
Drone integration is quite good: http://docs.drone.io/install-for-gitea/
If anything, no access token is being passed so the repos aren't shown for that reason. But I don't know whether the plugin supports them 🤷♂️ Here is the documentation for the endpoint: https://try.gitea.io/api/swagger#/organization/orgListRepos |
Thanks for the docs - reading them right now. The access token is probably not the problem, because if i don't configure the credentials of my JenkinsCI user in the CI Job Config, Gitea responds with 401 instead of returning public projects. Hm, i will take a look at the plugin's source (again) and try to find a hint why it behaves like this. |
After looking for help on the discord server, I've found a solution. The scanning works if i set the Jenkins User as Gitea Admin. The Jenkins User is in the Owner group of the Organization, so it actually should work without giving it global admin rights. |
I have the same problem, but the workaround with admin user does not change anything |
What does the Log of the Repository Scan report? (Jenkins' side) |
I am also sure, this is a gitea bug. Here are the steps to reproduce:
Now I see at https://try.gitea.io/ under "my repositories" the new repository owned by the organisation. |
I'm having the same issue here, too. Jenkins: 2.121.1 (dockerized running on jenkins/jenkins:lts-alpine) For me, the admin workaround is fine at the moment ... unfortunatelly the admin account has access to all repositories - so everybody who has permissions to create jobs can possibly find out about private repositories that they should not see normally :( |
I can confirm the issue with Gitea / Jenkins and also the workaround. As mentioned by @rsiggi this is easy to reproduce on https://try.gitea.io/. Using the API to get the repos of an org returns no results: Nevertheless, you can get details of an individual repo by providing the org and repo name: Hope that helps to narrow down the bug. |
May I suggest to change the title of this issue, e.g.:
|
I had same issue. |
…tea#5310) (go-gitea#3829) Signed-off-by: Daniel Balko <inxonic+github@gmail.com>
…vate repos with read access (go-gitea#5310) (go-gitea#3829) Signed-off-by: Daniel Balko <inxonic+github@gmail.com>
This is present in Gitea Version: 1.11.0. Looks like the fix is only targeted at 1.6 |
I'm experiencing the same issue with the following version: |
Please reopen new issue with description on how to reproduce such issue |
I'm experiencing the same issue with the following version: |
[x]
):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
The text was updated successfully, but these errors were encountered: