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

None of the methods in GitUtil fail if remoteRepoURL is an invalid git repository #232

Open
moosichu opened this issue Feb 12, 2018 · 1 comment

Comments

@moosichu
Copy link
Contributor

What the enhancement is

If the remoteRepoURL is invalid, we want an error to be thrown straight away. For example:

image

Happens when git is used in the command-line, but at the moment GitUtil doesn't check for these errors.

The line of code that is relevant is:

shell(args: "git", "clone", "--depth", "1", remoteRepoURL, localRepoPath, "--single-branch")

Maybe it returns -1 on error? (Not sure, haven't checked).

Why it could be helpful

The workshop validator could then throw an immediate error if a given repository doesn't exist, and similarly if invalid repository locations are added to the website for any other reason.

@moosichu
Copy link
Contributor Author

Nasty edge case: invalide GitHub repos as for authentication first! (For security reasons.)
Two solutions:

  • provide default auth info that is valid (create HaC bot account for this reason)
  • Provide completely incorrect auth info

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

No branches or pull requests

1 participant