Description
Severity
Medium
What release version, tag or commit-hash did you use?
main
Current Behavior
In some cases a clone request may be denied due to Github rate limiting. This may typically happen for corporate networks where the same IP is used by a large number of users. When doing velocitas init
you may get messages like:
Error: Can't find matching version for v2.5.2. Prefix with '@' for a branch or use a valid semantic version.
Even if the version actually existed and the problem is that clone failed!
Steps to Reproduce
Not easy - as you likely need quite huge number of github API requests
Expected Behavior
We cannot do anything about the rate limiting, but we should better print something like
"Clone failed for xxx"
<github message>
Possible Solution
Follow up on the clone, either identify an error by the returned simple-git message, or do some sanity check of the result and if expected files are not there give error/warning
private async _cloneRepository(packageDir: string, cloneOpts: string[]): Promise<void> {
await this.git.clone(this.packageConfig.getPackageRepo(), packageDir, cloneOpts);
}
Additional Information
I do not like this template!
Code of Conduct
- I agree to follow this project's "Code of Conduct".