-
Notifications
You must be signed in to change notification settings - Fork 353
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
Getting clone url for mirror returns 401 #829
Comments
After more testing and debugging i found out the the problematic code is here: Lines 956 to 962 in 4733e8c
If Also note that the url contains the url of the mirrored bitbucket instance and not the url of the primary bitbucket instance. The token itself is configured for the primary instance. |
I checked the api documentation of the endpoint which returns the url of the mirror. |
Jenkins and plugins versions report
Environment
Bitbucket Version: v8.9.5
What Operating System are you using (both controller, and any agents involved in the problem)?
Amazon Linux for controller and agents: see Enviroment
Reproduction steps
Expected Results
Jenkins should use the configured mirror
Actual Results
Mirror is not used at all. Fallback to primary server is always used for checkout. In Jenkins log the following is shown:
Anything else?
The url which is used in
BitbucketServerAPIClient.getMirroredRepository
contains already a jwt in the query parameter:https://MIRROR_URL/rest/mirroring/latest/upstreamServers/XXX/repos/XXX?jwt=TOKEN
.If i used this url for ex with
curl https://MIRROR_URL/rest/mirroring/latest/upstreamServers/XXX/repos/XXX?jwt=TOKEN
the request is successful.Are you interested in contributing a fix?
No response
The text was updated successfully, but these errors were encountered: