-
Notifications
You must be signed in to change notification settings - Fork 136
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
Support git+http #605
Comments
We need a way to specify the ACCESS token... Is it only fetching includes that fail? I'm asking because I've never tried gitlab-ci-local without ssh access. Possible workaround below. |
I couldn't really test it further since it fails pretty early. Checking the code, remote variables will probably also fail:
The workaround doesn't work for me.. |
@rndmh3ro I need a little more info about the workaround. What exactly did you put your global git config? |
I put this in my config. example.com replaced with my internal gitlab server.
This doesn't work, because the problem is that |
Oh, I thought git archive would use those git instructions. |
Looks like Gitlab is not support |
This is a dublicate I shall explicitly warn users about git+http in the README. Edit: it doesnt seem to be a dublicate, reopening. Edit: I'm an idiot 🤣 |
* Enabled download of includes over HTTP * Added option --git-over-http (default: false) * When active: Include-Parser uses git spare-checkout instead of git archive * fixed linter problems * autodetecting whether sparse checkout should be preferred * CLI option still available but hidden * Removed CLI option regardin sparse checkout * only auto-detection left over * refactored: parser-includes relies only on git-data * refactored: git-data detects schema on basis of firecow's proposed regexp * fix/workaround: test on invalid project includes passes now * The test attempted to compare an expected error text with the assertion error's message. * The assertion error's message might have changed previously, so the test failed * Analysis of the current logs of failing tests in the pipeline shows that different reasons might lead to an expected failure when calling 'git archive': * the server doesn't exist or isn't reachable (which could timeout), then error message contains - ssh: Could not resolve hostname <non-existing-hostname>: Name or service not known - fatal: the remote end hung up unexpectedly * the credentials for the server are wrong, then error message contains: - git@gitlab.com: Permission denied (publickey). - fatal: the remote end hung up unexpectedly * the repository doesn't exist on the server, then error message contains: - ERROR: The project you were looking for could not be found or you don't have permission to view it. - fatal: the remote end hung up unexpectedly * the file doesn't exist on the server, then error message contains: => remote: fatal: pathspec '.gitlab-modue.yml' did not match any files * Thus it seems OK to test against the 'fatal.*' only * preparing back-merge as discussed with firecow * using clearer if clauses for schema default ports * fixed target path for tar call --------- Co-authored-by: docdnp <dimitri.papoutsis@gmail.com> Co-authored-by: Mads Jon Nielsen <madsjon@gmail.com>
Is your feature request related to a problem? Please describe.
I have a private gitlab-instance that has no ssh-access enabled. I have to clone/push/etc via https.
When using includes in my
gitlab-ci.yaml
, gitlab-ci-local tries to download these includes. The functiondownloadIncludeProjectFile
usesgit archive
under the hood which does not work with https but only with ssh.Describe the solution you'd like
I'd like to use includes with my instance that has no ssh enabled.
Describe alternatives you've considered
Additional context
I thought about doing it with curl or wget via the gitlab API like this:
Or maybe with axios? However I'm not proficient with javascript to include a working solution.
The text was updated successfully, but these errors were encountered: