magit / forge

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

`forge-list-assigned-*` not working with salsa.debian.org #646

Closed sergiodj closed 6 months ago

sergiodj commented 6 months ago

I have a salsa.debian.org gitlab repository configured locally, and my global ~/.gitignore has:

[gitlab "salsa.debian.org/api/v4"]
  user = myuser

My ~/.authinfo also has the correct credentials.

I'm able to use forge without problems for regular issue/MR handling, but when I specifically call forge-list-assigned-issues, I get the Git variablegitlab.user' is unset. Set to:` prompt, even though my salsa username is set and recognized by other commands just fine.

This also impacts adding #'forge-insert-assigned-issues to magit-status-sections-hook.

sergiodj commented 6 months ago

Huh, I noticed that I didn't have an explicit entry like this on my ~/.gitconfig:

[gitlab]
  user = myuser

After adding it, things started working. Now I'm wondering if it this would work if I had different usernames on gitlab.com and salsa.debian.org...

tarsius commented 6 months ago

I get the Git variablegitlab.user is unset`:

Are you positive it said gitlab.user and not github.nil.user? Also please M-x toggle-debug-on-error and post the backtrace. I understand the issue in principal, but some details elude me.

Edit: Nevermind, figured out why that is.

sergiodj commented 6 months ago

Thank you for the very quick fix. I haven't tried it yet, but will let you know if I see the problem again.