magit / forge

Work with Git forges from the comfort of Magit
GNU General Public License v3.0
1.31k stars 114 forks source link

Ghub works but forge doesn't for self-hosted gitlab instance #589

Closed theottm closed 1 year ago

theottm commented 1 year ago

Hello,

When running f n in Magit status buffer I get

Cannot determine forge repository.  git@gitlab.myinstance.xyz:myproject/myproject.git isn’t a forge url

Here are the relevant local git variables:

gitlab.myinstance.xyz/api/v4.user=teddd
gitlab.host=myinstance.xyz/api/v4
remote.origin.url=git@gitlab.myinstance.xyz:myproject/myproject.git

I have no global git variables relative to any forge.

Despite forge not working, I am able to interact with the api of gitlab with ghub using

(ghub-request "GET" "/user" nil
              :forge 'gitlab
              :host "gitlab.myinstance.xyz/api/v4"
              :username "teddd"
              :auth 'ghub)

I have a line for both users teddd^forge and teddd^ghub in .authinfo.

It seems like forge is not able to use the information of git config. Did I miss something? I also tried to add git variable forge.remote=myinstance.xyz/api/v4 with no success.

Cheers,

Théo