I created a bridge to a gitlab repo and configured it.
However when I try to git bug bridge pull I got Error: missing identity token so I figured I did something wrong (what is an identity token? I provided an access token when I configured the bridge).
Edit:
I also don't know how to manually delete the bridge, I tried removing the .git/git-bug directory, but git bug bridge auth still shows the bridge.
Shane Pearman (spearman) commented (edited)
So I managed to reset the bridge configuration by removing the ~/.config/git-bug directory.
I also figured out that to remove the bridge, you need to use it's "name" (which was "default"), but this name isn't shown when you list the bridge with git bug bridge auth.
Also the original problem of getting 'Error: missing identity token' when trying to bridge pull seems to have been caused by using a project access token. Configuring the bridge using a personal access token allowed me to pull the issues. (Which by the way, the git bug dialog points to https://gitlab.com/-/profile/personal_access_tokens to create an access token, but this URL is no longer valid, it should be https://gitlab.com/-/user_settings/personal_access_tokens)
Shane Pearman (spearman) commented (edited)
Git bug bridge configure seems to have broken again, now when I try to provide an access token I get:
Error: Multiple matching identity found:
...
And lists two identities. I never explicitly created a second identity so I don't know how this happened. Also removing .git/git-bug and ~/.config/git-bug doesn't get rid of the identities.
Not sure if this is related but somewhere along the way of configuring a bridge and pulling, some empty commits were made that only show up when using git log --all:
Your initial issue seems to have been caused by an expectation that git bug bridge rm took the bridge ID instead of name, as you later discovered. I agree that this shines light on a poor UX, and that git-bug-bridge-rm should probably take the ID, to align with other commands -- although supporting both would be doable for now (until a future in which two bridges to the same external platform are supported)
The invalid key prefix message is shown when attempting to remove the bridge configuration from the local git configuration file ($GIT_DIR/config), if the section doesn't exist. Did you manually remove the bridge section? I don't think git-bug should care if the config section it's trying to remove doesn't exist.
Regarding multiple identities: when importing from a bridge, identities are created to account for user actions which do not map to current git-bug users.
To manually remove the identities, you'd need to rm -r .git/refs/identities -- but you should prefer using git bug wipe instead.
Regarding the "empty commits" you're seeing, let's first review what the --all flag does to git-log:
--all
Pretend as if all the refs in refs/, along with HEAD, are listed on the command line as <commit>.
git-bug creates objects for issues, which end up getting stored under the refs/bugs namespace, with identities being stored under the refs/identities namespace. git-log --all will thus show these refs as empty, authorless commits.