ezyang / ezyang/ghstack

Couldn't determine repo owner and name from url

Open
#266 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1k
Forks
84
PR merge metrics
No merged PRs in 30d

Description

Hi, I'm using privately hosted gitlab and encounterd the following error. I have checked #162 and #244 but I cound't find solution to my problem.

ERROR: Fatal exception
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.12/site-packages/ghstack/logs.py", line 105, in manager
    yield
  File "/opt/anaconda3/lib/python3.12/site-packages/ghstack/cli.py", line 46, in cli_context
    yield shell, config, github
  File "/opt/anaconda3/lib/python3.12/site-packages/ghstack/cli.py", line 258, in submit
    ghstack.submit.main(
  File "/opt/anaconda3/lib/python3.12/site-packages/ghstack/submit.py", line 260, in main
    submitter = Submitter(**kwargs)
                ^^^^^^^^^^^^^^^^^^^
  File "<string>", line 24, in __init__
  File "/opt/anaconda3/lib/python3.12/site-packages/ghstack/submit.py", line 380, in __post_init__
    repo = ghstack.github_utils.get_github_repo_info(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.12/site-packages/ghstack/github_utils.py", line 71, in get_github_repo_info
    name_with_owner = get_github_repo_name_with_owner(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.12/site-packages/ghstack/github_utils.py", line 44, in get_github_repo_name_with_owner
    raise RuntimeError(
RuntimeError: Couldn't determine repo owner and name from url: git@git.COMPANY_NAME.com:PROJECT_NAME/TEAM_NAME/REPO_NAME.git

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in ghstack/github_utils.py at get_github_repo_name_with_owner and get_github_repo_info, using the traceback and private GitLab URL as reproduction context. Determine how the owner and repository name should be obtained from this URL, then verify that ghstack submit no longer raises this error for the reported repository format.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.