Closed patrikhuber closed 5 months ago
In case this is an authentication issue (as our repository is private):
I can successfully do: git clone https://gitlab.com/myorg/mysubgroup/my-test-package.git
from the same command-line I'm running vcpkg, without having to enter any username/password. I'm using Windows 11 and git-for-Windows with the (git/Windows) credentials manager. So presumably vcpkg's git should be able to have access to this repo, or does it use a separate git or credentials store?
I've read through https://learn.microsoft.com/en-us/vcpkg/users/authentication as well. I've tried "pre-seeding" (not sure if this is needed in my setup...):
"url=https://gitlab.com`npath=myorg/mysubgroup/my-test-package`nusername=myusername`npassword=mypassword`n"
| git credential approve
but this didn't help either.
vcpkg_from_gitlab
does not use git. Use AUTHORIZATION_TOKEN
argument or fall back to vcpkg_from_git
.
Unfortunately, AUTHORIZATION_TOKEN
is not documented yet.
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.
@Osyotr Thank you! I haven't gotten back to trying this again, but that's very useful to know.
I would suggest to keep this issue open and improve the vcpkg_from_gitlab
documentation & document AUTHORIZATION_TOKEN
?
Please open an issue in docs repo. Go to https://learn.microsoft.com/en-us/vcpkg/maintainers/functions/vcpkg_from_gitlab and click "Open a documentation issue".
I've created https://github.com/microsoft/vcpkg-docs/issues/338, I'll close this.
Describe the bug vcpkg-custom-overlay/my-test-package/portfile.cmake with vcpkg_from_gitlab:
Then installing it from a custom overlay with:
It fails at:
and
BUT: If I put the above "encoded" URL into the browser (https://gitlab.com/api/v4/projects/%6d%79%6f%72%67%2f%6d%79%73%75%62%67%72%6f%75%70%2f%6d%79%2d%74%65%73%74%2d%70%61%63%6b%61%67%65/repository/branches/main), it resolves to
https://gitlab.com/api/v4/projects/%6d%79%6f%72%67%2f%6d%79%73%75%62%67%72%6f%75%70%2f%6d%79%2d%74%65%73%74%2d%70%61%63%6b%61%67%65/repository/branches/main
, and this results in a valid reply, not a 404:(Note this is a private repo and I've changed the names, so if you run the above line in your browser, you will get a 404 in the browser too obviously as you won't have access to our internal project - but I don't get a 404 in the browser if I try it with the real internal name of the project.)
This should be easily reproducible by creating your own (even empty) GitLab repo and trying
vcpkg_from_gitlab
. It looks like something withinvcpkg_from_gitlab
is going wrong?Environment
To Reproduce See above.
Expected behavior As the URL is clearly correct when manually putting it into the browser, I'd expect vcpkg_from_gitlab to be able to not display a 404, or give me a more descriptive error message.
Failure logs See above & below output.
Additional context Full cmdline output: