diff --git a/src/python/jw/pkg/cmds/projects/CmdListRepos.py b/src/python/jw/pkg/cmds/projects/CmdListRepos.py index ec9d3ece..0a13c880 100644 --- a/src/python/jw/pkg/cmds/projects/CmdListRepos.py +++ b/src/python/jw/pkg/cmds/projects/CmdListRepos.py @@ -62,6 +62,7 @@ class CmdListRepos(Cmd): # export if re.match(r'https://', args.base_url): # assume Forgejo / Gitea Backend curl_args = ['-f'] + tried: list[str] = [] if password is not None: assert username is not None cmd_input = (f'-u {username}:{password}').encode('utf-8') @@ -69,15 +70,15 @@ class CmdListRepos(Cmd): # export for entities_dir in ['orgs', 'users']: api_url = f'{args.base_url}/api/v1/{entities_dir}/{args.from_user}/repos' try: + tried.append(api_url) repos = await run_curl(curl_args + [api_url], cmd_input=cmd_input) for repo in repos: print(repo['name']) break except Exception as e: - log(DEBUG, f'No data from {api_url} ({str(e)})') pass else: - raise RuntimeError(f'Failed to fetch repository list from assumed Forgejo instance at {args.base_url}') + raise RuntimeError(f'Failed to fetch repository list from assumed Forgejo instance at {args.base_url}, tried {', '.join(tried)}') return if os.path.isdir(args.base_url): for subdir in ["." , args.from_user]: