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

git clone should not try to clone submodules and surface errors properly #3581

Closed
Panaetius opened this issue Aug 10, 2023 · 0 comments · Fixed by #3630
Closed

git clone should not try to clone submodules and surface errors properly #3581

Panaetius opened this issue Aug 10, 2023 · 0 comments · Fixed by #3630
Assignees
Labels

Comments

@Panaetius
Copy link
Member

The code in https://github.com/SwissDataScienceCenter/renku-python/blob/master/renku/core/util/git.py#L825-L833 will try to clone a repo with a branch, and if it fails, try again without the branch in case the ref was not a branch but a commit/tag instead, with a checkout after the clone.

As things currently are, if a user has submodules in their repo which are either private or use a git ssh url (because the core-svc does not have the ssh executable installed), cloning will fail, but the second call to clone will swallow the error from the first try, but will fail because the target directory is now non-empty from the failed first call.

We should:

  • clone without cloning submodules
  • clean the folder if the first clone failed and it's now non-empty
  • make sure the correct error is returned to the user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants