Problem with custom gitlab instance #871
|
Hello, I am trying to setup Forge with a custom Gitlab instance. My URL follows this pattern : gitlab.mydomain.com I followed the steps in the manual
(with-eval-after-load 'forge
(add-to-list 'forge-alist
'("gitlab.mydomain.com"
"gitlab.mydomain.com/api/v4"
"gitlab.mydomain.com"
forge-gitlab-repository)))
git config --global gitlab.gitlab.mydomain.com.user ylan
I set the variable auth-sources-debug to trivia to get more information and I get: I might have done something wrong, but I am suspicious of the 3rd and last line when it tries to find a token for "mydomain.com" without the "gitlab." in front of it which is part of my gitlab instance URL. |
Replies: 1 comment 1 reply
|
The mismatch is in the Keep the Then run The shortened Sources: Ghub's GitLab authinfo example and the token lookup/domain fallback. |
The mismatch is in the
machinefield of the authinfo entry. Your log shows Forge/Ghub looking forgitlab.mydomain.com/api/v4, while your entry only hasgitlab.mydomain.com.Keep the
forge-alistentry and Git username setting as shown, but use:Then run
M-x auth-source-forget-all-cachedand retry the Forge operation. Keep the actual token local.The shortened
mydomain.comlookup is a fallback: Ghub first checks the full API host, then derives a parent domain usingghub--host-domain. It is not strippinggitlab.from your Git configuration variable. You can satisfy the first lookup directly with the API-host entry above.…