Skip to content

Commit 0e7ae79

Browse files
authored
fix: follow redirects when probing repositories (#436)
Fixes #431.
1 parent d475878 commit 0e7ae79

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • components/renku_data_services/repositories

components/renku_data_services/repositories/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ async def probe_repository(repository_url: str) -> bool:
77
"""Probe a repository to check if it is publicly available."""
88
async with httpx.AsyncClient() as client:
99
url = f"{repository_url}/info/refs?service=git-upload-pack"
10-
res = await client.get(url=url)
10+
res = await client.get(url=url, follow_redirects=True)
1111
if res.status_code != 200:
1212
return False
1313
return bool(res.headers.get("Content-Type") == "application/x-git-upload-pack-advertisement")

0 commit comments

Comments
 (0)