0.8.0 issue with Authentication

Labels: area/git kind/bug resolution/closed triage/accepted

Timeline

Isaac Johnson (idjohnson) opened

I setup 0.8.0 (Linux amd64) in WSL running Ubuntu 20.04 (focal) and git 2.25.1

I tried with an Org GH Repo, Personal GH repo and a freshly pulled AzDO repo.

$ git bug pull
Fetching remote ...
Error: authentication required

I tried with 0.7.2 without issue.

I even tried migrating a working repo then using 0.8.0 and got the error again

...snip
Migration #3
Purpose: Make bug and identities independent from the storage by making the ID generation self-contained. Also, migrate to the new full DAG entity data model.

identity 1b5c437: migrated to 73519a0
bug b3d0ba7: migrated to 025f7c3


Done!
builder@DESKTOP-72D2D9T:~/Workspaces/testgitbug$ git bug ls
A lock file is present but the corresponding process is not, removing it.
Building identity cache... Done.
Building bug cache... Done.
025f7c3 open    Bug Title 1                                             Isaac Johnson
builder@DESKTOP-72D2D9T:~/Workspaces/testgitbug$ git bug pull
Fetching remote ...
Error: authentication required

Steve Moyer (smoyer64) commented

Is your SSH key defined in WSL2 and added to GitHub or is your SSH key in Windows. If it's the latter, you have to configure your WSL2 environment by running the ssh-agent. If you want to share your signing keys between Windows and WSL2, you also have to set up your system to serve the PGP keys from Windows and use them from WSL2.

Isaac Johnson (idjohnson) commented

This is just a WIP writeup that covers all the steps I tried - windows, wsl, pre-compiled and compiled from source: http://freshbrewed-test.s3-website-us-east-1.amazonaws.com/2022/12/13/gitbug.html

Isaac Johnson (idjohnson) commented

I tried: WSL https (my usual) with GH Public, Private and Azure DevOps private repos. I tried WSL SSH I tried Windows HTTPS.

I tried 0.8.0 and in WSL, also freshly compiled from main.

KG (k-g) commented

I get the same error, under Ubuntu, pushing to a remote on github requiring username and password. Normal push and pull of repo works fine.

Isaac Johnson (idjohnson) commented

I got same error with windows and Mac and Ubuntu. Do you have and path that works with 0.8.0 I could try?

On Wed, Nov 30, 2022, 6:08 PM KG @.***> wrote:

I get the same error, under Ubuntu, pushing to a remote on github requiring username and password. Normal push and pull of repo works fine.

— Reply to this email directly, view it on GitHub https://github.com/MichaelMure/git-bug/issues/934#issuecomment-1332921357, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTDTVLTIG6DOEZYY27OCHDWK7UALANCNFSM6AAAAAASMKHZQM . You are receiving this because you authored the thread.Message ID: @.***>

Steve Moyer (smoyer64) commented

I can replicate this issue ...

davidberglund (davidberglund) commented (edited)

git-bug 0.8.0 (haven't tried earlier releases) on MacOS and I also can't push/pull from remote with git-bug, while push/fetch/pull <--> remote works fine with git form the same repo using ssh keys. I tried to create

$>git-bug push    
Error: authentication required

git-bug user ls    
88eef59 David Berglund

git-bug user   
Id: 88eef592...   

I'd be happy to troubleshoot further if I knew where to start. (Happy holidays btw :)

davidberglund (davidberglund) commented

CGO dependency

I run the binary release. Is that with go-git 5.4.2? And is your suggestion that I try compiling git-bug from source with go-git 5.5.1?

Michael Muré (MichaelMure) commented

Go-git 5.4.2 doesn't have CGO, but the most recent do. Yes, try compiling with that last one and see if that fix this problem. Master is fairly unstable though, as it got a large refactor recently.

davidberglund (davidberglund) commented

I have the same issue after compiling from master. At least I didn't get any new problems AFAIK.

davidberglund (davidberglund) commented (edited)

Aha, my bad, I thought the tip was requiring 5.5.1, it referred to 5.4.2. I'll try again.

Michael Muré (MichaelMure) commented

Master doesn't have the updated go-git.

davidberglund (davidberglund) commented (edited)

Not very experienced with building go apps. How do I get passed or bypass the checksum mismatch that occurs upon running make install after changing the required go-git to 5.5.1? Thanks

This download does NOT match an earlier download recorded in go.sum

I tried to run

go clean -modcache 
go mod tidy

Michael Muré (MichaelMure) commented

It looks like something happened upstream. What if you checkout that dependabot PR and just make ?

davidberglund (davidberglund) commented

That worked. I have the same authentication error with git-bug push/pull, though.

Michael Muré (MichaelMure) commented

Then it's likely an outstanding issue in go-git :-/

davidberglund (davidberglund) commented

Ok, I think my main (tiny) contribution is going to be on this level as I'm not a go hacker. I'll keep subscribing to this issue at least.

Michael Muré (MichaelMure) commented

It's already useful! Maybe you could look for a matching issue in go-git, or open one?

Michael Muré (MichaelMure) commented

Also, could you confirm that there is no issue with git-bug v0.7.2 (try in a new repo to avoid data issue)?

davidberglund (davidberglund) commented

I can confirm that git-bug push/pull works fine with 0.7.2. and with the same repo + remote.

Steve Moyer (smoyer64) commented

I've updated go-git in de6f5404e403bff0124d76124964a6c6d05b2332 - While the dependabot-created PR doesn't build, I'm not surprised that it also solves your issue.

Marco Pellin (marcopellin) commented

Are there some news about this issue? I would like to let my team test git-bug, and currently I'm stuck at this point. Are you planning to release a new update soon?

Marius Boepple (mariusboepple) commented

I had the following authentication error:

git bug push
Error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

I fixed it by assigning a dedicated ssh config for the git repository's host like described here https://gist.github.com/rbialek/1012262

Matěj Cepl (mcepl) commented

tumbleweed-pkg~/a/2/p/imapArch (master)$ git bug version
git-bug version: -dev-
tumbleweed-pkg~/a/2/p/imapArch (master)$ sed -n -e '/fedorapeople/,+20p' ~/.ssh/config
Host *fedorahosted.org *fedorapeople.org pkgs.fedoraproject.org
    User mcepl
    ProxyCommand none
    ForwardAgent no
    ForwardX11 no
    ForwardX11Trusted no
    Port 22
    KeepAlive yes
    HashKnownHosts no
    GSSAPIAuthentication no
    VerifyHostKeyDNS yes
    IdentityFile /home/matej/.ssh/id_ed25519

Host fedorapeople
    User mcepl
    Hostname fedorapeople.org
    ForwardAgent no
    ForwardX11 no
    ForwardX11Trusted no
    PreferredAuthentications publickey
    IdentityFile /home/matej/.ssh/id_ed25519
tumbleweed-pkg~/a/2/p/imapArch (master)$ git remote -v
fedorapeople	fedorapeople:public_git/imapArch.git (fetch)
fedorapeople	fedorapeople:public_git/imapArch.git (push)
sourcehut	https://git.sr.ht/~mcepl/imapArch (fetch)
sourcehut	git@git.sr.ht:~mcepl/imapArch (push)
tumbleweed-pkg~/a/2/p/imapArch (master)$ git push fedorapeople master:master
Warning: No xauth data; using fake authentication data for X11 forwarding.
X11 forwarding request failed on channel 0
Everything up-to-date
tumbleweed-pkg~/a/2/p/imapArch (master)$ git bug push fedorapeople
Error: ssh: handshake failed: ssh: no authorities for hostname: fedorapeople.org:22
tumbleweed-pkg~/a/2/p/imapArch (master)$ 

(the version is actually 0.8.0)

Mikhail (myrrc) commented

I can confirm that binary taken from https://github.com/MichaelMure/git-bug/releases/tag/v0.8.0 fails to push or pull with error

~/src/nfmd/nfmd-0.0 git bug push
Error: ssh: handshake failed: ssh: disconnect, reason 2: Too many authentication failures

Binary built from this tag works perfectly.

~/src/nfmd/nfmd-0.0 uname -a
Linux i108586084 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
~/src/nfmd/nfmd-0.0 cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"

Matěj Cepl (mcepl) commented

Binary built from this tag works perfectly.

Which tag?

Mikhail (myrrc) commented

0.8.0

-- Mikhail :з

Matěj Cepl (mcepl) commented

On Mon Feb 5, 2024 at 5:28 PM CET, Mike Kot (Михаил Кот) wrote:

0.8.0

So, they rewrote one with different commit? Awesome!

Matthew Scheffel (isosphere) commented

I had a similar problem.

My issues were:

  1. On one machine I was configured to use HTTP rather than SSH for the remote
  2. I expected git bug to use my existing .ssh/config that git was using - it doesn't

The solution to the first was to change the url with git remote set-url, and the solution to the latter was to add the authentication key I use via ssh-key add. This works on Windows these days, you just have to enable the ssh agent service.

github-actions (github-actions) commented

This bot triages untriaged issues and PRs according to the following rules:

  • After 90 days of inactivity, the lifecycle/stale label is applied
  • After 30 days of inactivity since lifecycle/stale was applied, the issue is closed

To remove the stale status, you can:

  • Remove the lifecycle/stale label
  • Comment on this issue

github-actions (github-actions) added label lifecycle/stale

Michał Góral (mgoral) commented

Bad bot

github-actions (github-actions) removed label lifecycle/stale

sudoforge added label triage/accepted

sudoforge added label kind/bug

sudoforge added label area/git

Wesley (donnaken15) commented

I finally figured out this conundrum (after a year) but now I'm stuck at "You're using an RSA key with SHA-1, which is no longer allowed." because I plainly generated a new SSH key with no parameters, and I want to be able to have it as a subkey for my GPG key.

Wesley (donnaken15) commented

I reimported my key with the SHA-1 subkey removed and added a newly generated SHA-2 subkey and it still puts this above error.

sudoforge added label priority/important-soon

sudoforge added label lifecycle/active

sudoforge commented (edited)

as of dd67e19c81e2edd2deb983678c7b38d17cccdc09, i am unable to reproduce this using an SSH URI, and in the example below, i demonstrate this using github as a remote. due to the age of this issue and the changes that have been merged since its inception, i'm going to close this.

if you encounter any issues performing a similar test to the one below, with the current development head, please open a new issue.


boilerplate to create a new repository

➜ cd $(mktemp -d)


➜ gh repo create --private git-bug-934
✓ Created repository sudoforge/git-bug-934 on GitHub
  https://github.com/sudoforge/git-bug-934


➜ git init .
Initialized empty Git repository in /tmp/tmp.ItmJB4YnGE/.git/


➜  git remote add origin git@github.com:sudoforge/git-bug-934.git

demo of a functional workflow

➜ gpg-connect-agent killagent /bye
# i use gpg-agent as ssh-agent; killing it to clear the agent's cache


➜ git bug version
git-bug version: v0.8.0-dev-dd67e19c81


➜ git bug user new -e 'no-reply@domain.com' -n 'git-bug-user' --non-interactive
Building cache...

fc50abbcf7d02d265b4b0fcf781bea072769115120b1264d2e4e08a4d6b4da21


➜ git bug bug new -t "just a test" -m "some test comment" --non-interactive
ef405eb created


➜ git bug push
# i was prompted for my key's passphrase and the push was successful


➜ git ls-remote origin
eba9c63f348bafe77e624fa23770312f78441f85        refs/bugs/ef405eb4984561d1c88b9f882b930ece20175fb582ff6ec6dab1f63634575bbc
7ca72084c1c13d4a0f9a6aa6cca71bfdbd65d61c        refs/identities/fc50abbcf7d02d265b4b0fcf781bea072769115120b1264d2e4e08a4d6b4da21

cleaning up

➜ gh repo delete --yes sudoforge/git-bug-934
✓ Deleted repository sudoforge/git-bug-934

sudoforge closed the bug

sudoforge removed label lifecycle/active

sudoforge removed label priority/important-soon

sudoforge added label resolution/closed

Jonas Müller (muellerj) commented

Is there any chance of releasing a 0.8.1? This is a hard blocker when using the packaged binaries from apk for example.

Jonas Müller (muellerj) commented

Thanks for the heads up! I'll try again once 0.8.1 is released.

On 25/04/29 at 16:47, <sudoforge @.***)> wrote:

sudoforge left a comment (git-bug/git-bug#934) (https://github.com/git-bug/git-bug/issues/934#issuecomment-2839208042)

@muellerj (https://github.com/muellerj) yes, please see the 0.8.1 milestone (https://github.com/git-bug/git-bug/milestone/9).

— Reply to this email directly, view it on GitHub (https://github.com/git-bug/git-bug/issues/934#issuecomment-2839208042), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AAAM77R4USPHPBKQEOXIBW3236GGPAVCNFSM6AAAAAB2ZD223WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMZZGIYDQMBUGI). You are receiving this because you were mentioned.Message ID: @.***>

Mohammad Azeem (mohammadazeemwani) commented

I am still having the issue on v0.10.1 OS: macOS Tahoe 26.2 arm64

╰─➤  git bug push 
Error: ssh: handshake failed: ssh: unable to authenticate, 
attempted methods [none publickey], no supported methods remain