-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Let's say we have a remote repository https://github.com/user/repo.git and it wasn't added to local git remote list. The following code should create the repository if 'git ls-remote' fails
try:
subprocess.check_call(['git', 'ls-remote', git_repository])
except subprocess.CalledProcessError:
try:
subprocess.check_call(['git', 'remote', 'add', 'po_translator', git_repository])
except subprocess.CalledProcessError as e:
raise PODocsError(e)
Bit if the public key is set correctly, running 'git ls-remote git@github.com:user/repo.git' doesn't cause an exception and, later, the code fails because the repo po_translator doesn't exist.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels