Skip to content
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

Missing origin repo throws error #405

Closed
aidanheerdegen opened this issue Jan 22, 2024 · 1 comment
Closed

Missing origin repo throws error #405

aidanheerdegen opened this issue Jan 22, 2024 · 1 comment
Assignees
Labels

Comments

@aidanheerdegen
Copy link
Collaborator

aidanheerdegen commented Jan 22, 2024

Using the new version (1.1) version of payu with an existing configuration repo threw the following error with payu checkout because the origin repo no longer exists:

Traceback (most recent call last):
  File "/g/data/vk83/apps/payu/1.1/bin/payu", line 10, in <module>
    sys.exit(parse())
  File "/home/502/aph502/code/python/payu/payu/cli.py", line 41, in parse
    run_cmd(**args)
  File "/home/502/aph502/code/python/payu/payu/subcommands/checkout_cmd.py", line 34, in runcmd
    checkout_branch(is_new_branch=new_branch,
  File "/home/502/aph502/code/python/payu/payu/branch.py", line 145, in checkout_branch
    repo.checkout_branch(branch_name, is_new_branch, start_point)
  File "/home/502/aph502/code/python/payu/payu/git_utils.py", line 147, in checkout_branch
    remote_branches = self.remote_branches_dict()
  File "/home/502/aph502/code/python/payu/payu/git_utils.py", line 127, in remote_branches_dict
    remote.fetch()
  File "/g/data/vk83/apps/payu/1.1/lib/python3.9/site-packages/git/remote.py", line 1014, in fetch
    res = self._get_fetch_info_from_stderr(proc, progress, kill_after_timeout=kill_after_timeout)
  File "/g/data/vk83/apps/payu/1.1/lib/python3.9/site-packages/git/remote.py", line 853, in _get_fetch_info_from_stderr
    proc.wait(stderr=stderr_text)
  File "/g/data/vk83/apps/payu/1.1/lib/python3.9/site-packages/git/cmd.py", line 600, in wait
    raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git fetch -v -- origin
  stderr: 'fatal: '/home/502/aph502/1deg_jra55_ryf' does not appear to be a git repository
fatal: Could not read from remote repository.'

Command run:

payu checkout timing-test

Output of git remote -v

origin  /home/502/aph502/1deg_jra55_ryf (fetch)
origin  /home/502/aph502/1deg_jra55_ryf (push)

But this directory (repo) no longer exists:

ls: cannot access '/home/502/aph502/1deg_jra55_ryf': No such file or directory

I removed the origin repository, got an error because I didn't specify -b timing-test. Doing so it worked fine and checked out a branch and created the related laboratory.

@jo-basevi
Copy link
Collaborator

Closed by #512

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

No branches or pull requests

2 participants