-
-
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
shields.io with self-host gitlab & private repo #2911
Comments
Hi! Could the problem be that the URL parameter isn't encoded correctly? You could use this form: https://www.urlencoder.org/ |
When I used encoded url after url= , like It also shows inaccessible |
There's a double && in there that should be a single &. And maybe URL-encode the query too? |
I have tried a single & and url_encode the query, like this link: but nothing changes, also shows inaccessible |
It's hard to debug this further without a working example. One suggestion: if you start the server with |
I used public shield.io not self-host |
Perhaps this would be more easily accomplished using the new Endpoint service badge (#2838)? It looks like with this current approach you are hardcoding the badge color to brightgreen, regardless of the pipeline status. If you deployed a custom endpoint it might make debugging a bit easier and allow for some custom logic around status, etc. |
I have try to delete &colorB=brightgreen in the links, but no changes. |
I was actually suggesting that instead of using the dynamic json badge (which you are currently using), that you should consider trying the new endpoint badge type instead (https://shields.io/#/endpoint). I was not suggesting removing the |
When I try with endpoint with json file, it also show inaccessable |
Sorry I don't understand what you mean. If you have developed, and deployed a custom endpoint that you are using with the Endpoint badge, can you please share the link to your Endpoint? |
I found the problem, If use ecc certificate in url, it will show inaccessable, but if use rsa certificate, it's ok, no problem. |
Huh, I wonder if that's related to #2812. |
So how can i solve this problem? Just drop ecc certificate and use old rsa certificate? |
this works: h_t_t_p_s://img.shields.io/badge/dynamic/json?color=blue&label= example: h_t_t_p_s://img.shields.io/badge/dynamic/json?color=blue&label=version&query=version&url=https%3A%2F%2F ^ this extracts the version property from a file version.json in the master branch |
Are you experiencing an issue with...
🪲 Description
I used my own gitlab instance and private repo. When I used with shield.io, the link is: https://img.shields.io/badge/dynamic/json.svg?label=build&colorB=brightgreen&&query=$.last_pipeline.status&url=https://${gitlab_url}/api/v4/projects/${projects_id}/repository/commits/master?private_token=${private_toke}
but it always shows
And I confirm that url with my gitlab_url has correct answer with json format
UPDATE:
When url link is ecc certificate, it will show inaccessible. But when you use rsa certificate, it will be ok.
🔗 Link to the badge
💡 Possible Solution
The text was updated successfully, but these errors were encountered: