Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

sonar API request behind a proxy #101

Open
erable2 opened this issue May 23, 2024 · 0 comments
Open

sonar API request behind a proxy #101

erable2 opened this issue May 23, 2024 · 0 comments

Comments

@erable2
Copy link

erable2 commented May 23, 2024

Hi,

I'm trying to make a request to Sonar API behind the proxy of my company but i can't make it work.

I tried this :

os.environ["HTTPS_PROXY"] = "proxy_url:8080"

sonar = SonarQubeClient(sonarqube_url="https://sonar_url/", token="****")

projects = sonar.projects.search_projects()
print("projects: {}".format(projects))

I got this result :
requests.exceptions.ProxyError: HTTPSConnectionPool(host='sonar_url', port=443): Max retries exceeded with url: /liferay/sonar/api/projects/search?onProvisionedOnly=false&qualifiers=TRK (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 502 badgateway')))

Is there a way to define proxy settings in a SonarQube client ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant