I'm trying to use our custom registry to download a port of our library from gitlab, unfortunately vcpkg can't verify the hash since gitlab always generates a new package with a different hash as it seems.
error: File does not have the expected hash:
url: https://fancy.gitlab.com/example-lib/-/archive/e401873dd6c647ea3217e50fe655f2037f3dab93/example-lib-e401873dd6c647ea3217e50fe655f2037f3dab93.tar.gz
File: /opt/vcpkg/downloads/example-lib-e401873dd6c647ea3217e50fe655f2037f3dab93.tar.gz.2370.part
Expected hash: 18963aa350c214162f0b7b2781af746d6426146ff5b0c49bd379476fbf2eefe24163e412697c6381b1125d4f57bae082ba99d010e37808b64f9ec1ad16362e45
Actual hash: f381abbf07262243d41abfe2d76ac37e8c0a6902bce3c2d9281a66936849bd9a36be705010fee3e19f9b080edf28c3ece29ff274de2848c1ae38e27ea6dc1610
Doesn't matter if I update the SHA512
in my portfile to the Actual hash
-value, it always changes. Here's my portfile for the lib.
vcpkg_from_gitlab(
GITLAB_URL https://fancy.gitlab.com
OUT_SOURCE_PATH SOURCE_PATH
REPO example-lib
REF e401873dd6c647ea3217e50fe655f2037f3dab93
SHA512 18963aa350c214162f0b7b2781af746d6426146ff5b0c49bd379476fbf2eefe24163e412697c6381b1125d4f57bae082ba99d010e37808b64f9ec1ad16362e45
HEAD_REF main
)
Is this a vcpkg or gitlab problem?
Answer was simple - vcpkg_from_gitlab
seems to work only on repositories hosted on the main Gitlab servers, not own installations.
So to check out from your privately hosted Gitlab repositories, just use vcpkg_from_git
...