I had used git-bug over a year ago and have already configured bridge. Running it now results in
(git)smaug:/mnt/btrfs/datasets/datalad-git-bug[master]git
$> strace -f -o /tmp/bridge-pull.strace git bug bridge pull
import error: non-200 OK status code: 401 Unauthorized body: "{\"message\":\"Bad credentials\",\"documentation_url\":\"https://docs.github.com/graphql\"}"
imported 0 issues and 0 identities with default bridge
since I failed to find how to change the token, I found in that strace that auth was saved into /home/yoh/.config/git-bug/keyring/auth-0c111SENSORED which I moved aside in hope that git bug would ask me for a token to store -- but nope:
$> git bug bridge pull
A lock file is present but the corresponding process is not, removing it.
Error: missing identity token
So I decided to ask on how could I provide a new/replacement token?
$> git bug version
git-bug version: 0.7.1-dev-b2e98ef07f
Guilbert Pierre (guilbep) commented
@yarikoptic I'm using version v0.8.0 so I'm not sure if it's gonna help 0.7.1
but if you do a git bug bridge auth you'll have the list of token
and git bug bridge auth add-token --target github --login=yourlogin to add your newly generated token.
@MichaelMure I still think that finding 'documentation' insides the issues is a bad idea. It should be in the manpage at least imho
I can do a pull request if you change your mind.
Thank you for the great work
Michael Muré (MichaelMure) commented
Doc improvement is very very much welcome :-)
Yaroslav Halchenko (yarikoptic) commented
I'm using version v0.8.0 so I'm not sure if it's gonna help 0.7.1
indeed I had no output on my version. So I upgraded git-bug, tried it, was alerted to migrate, did migration
/home/yoh/proj/misc/git-bug-migration/git-bug-migration --for-real 297.43s user 148.24s system 89% cpu 8:18.22 total
not clear which path it talks about, probably not related really to auth but rather something about git-bug since happens also for git-bug bug. search brought no hits. My guess - migration didn't go "well"?
Michael Muré (MichaelMure) commented
Not sure what's happening, but you can try to delete .git/git-bug to force recreating the cache. It looks like you have a conflicting file?
Yaroslav Halchenko (yarikoptic) commented
eh, moved all previous 144MB aside and rerunning... it was hanging for awhile on
may be I am missing specific aspect, but that is exactly what I was trying to do - to get the "identity" of the auth by running git-bug bridge auth but as I shown - it gives no output.
Yaroslav Halchenko (yarikoptic) commented
after 20 minutes it was done
We need to track why it's so slow.
may be a sheer number of issues (>2k) could be a reason? I remember that I had to run initial pull for an extended amount of time to get them all. .git/git-bug is now 221MB.
Michael Muré (MichaelMure) commented
Yes but you are rebuilding from local data. Did you notice it it stays long at 100%?
Yaroslav Halchenko (yarikoptic) commented
Yes but you are rebuilding from local data. Did you notice it it stays long at 100%?
yes, IIRC it was staying awhile after relatively quickly reaching 100%. I still have a tarball of not upgraded repository. I do not think it has any secrets in it. If you want, I can give it to you (100MB .tar.gz) to benchmark if so desired (may be my BTRFS file system got busy/slow at that point? unlikely though).
@smoyer64 @yarikoptic as I said above the following worked for me (in git-bug version 0.8.0) to update/change my token:
git bug bridge auth # to list the token
f1666cc github token ghp_IWONTTELLYOU login:MYUSERNAME
git bug bridge auth rm f1666cc # to remove the tokengit bug bridge auth add-token --target github --login= MYUSERNAME # to add your newly generated token.
By the way. Maybe the problem is from somewhere else. I noticed that only Tokens (classic) are working and not Fined grained tokens.
And that info is not in the documentation yet.
Michael Muré (MichaelMure) commented
Nobody has cared to implement support for those new token. A good first step would be to know what changes need to happen: is it just a different validation regex? Do we need to do request differently?
Guilbert Pierre (guilbep) commented
Nobody has cared to implement support for those new token. A good first step would be to know what changes need to happen: is it just a different validation regex? Do we need to do request differently?