Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git authentication fails #2582

Closed
bripkens opened this issue Feb 11, 2024 · 9 comments
Closed

Git authentication fails #2582

bripkens opened this issue Feb 11, 2024 · 9 comments
Labels
auth* Issues with authentication and authorisation, usually with forges bug Something isn't working

Comments

@bripkens
Copy link

bripkens commented Feb 11, 2024

Hey folks,

the git authentication is failing for me through the Gitbutler client. It is however working fine through the git CLI and various IDEs (Intellij and VSCode for example).

My setup:

  • GitHub auth via SSH keys
  • The SSH identity is stored in my OpenSSH auth agent (ssh-add -l)
  • The identity to use for GitHub is defined within my SSH config (cat ~/.ssh/config)

Within Gitbutler, I tried the Auto Detect mode, as well as Use existing SSH key (without passphrase).

Error shown within Gitbutler:

image
@dchaniel
Copy link

This is happening for me as well, making Gitbutler functionally useless until this is fixed since I can't create pull requests from virtual branches.

I'm on a Mac M1 Pro, and have identical setup to the above.

I'm excited about gitbutler and will try it out again when this is fixed!

@mtsgrd
Copy link
Contributor

mtsgrd commented Mar 2, 2024

Hey, sorry about the delay and about the issue you're running into. @bripkens do you use a git remote with an invalid host in order to specify the identity file? This is currently known to break the app, but we're keen to find a solution.

@bripkens
Copy link
Author

bripkens commented Mar 2, 2024

Hey, sorry about the delay and about the issue you're running into. @bripkens do you use a git remote with an invalid host in order to specify the identity file? This is currently known to break the app, but we're keen to find a solution.

@mtsgrd To the best of my knowledge nothing is misconfigured/has an invalid host. For your info, here are excerpts of the files. And as mentioned, the config is working with all other solutions I am using (VSCode, Intellij and the git client itself):

$ cat ~/.ssh/config
Host github.com
  IdentityFile ~/.ssh/ed25519%
$ cat ~/.gitconfig
[credential]
  helper = osxkeychain
[url "[email protected]:"]
  insteadOf = https://github.com/
$ ssh-add -l
256 SHA256:Ro9{elided}s9yV5k [email protected] (ED25519)
$ git remote -v
origin  [email protected]:dash0hq/{elided}.git (fetch)
origin  [email protected]:dash0hq/{elided}.git (push)

^ Trailing % after ~/.ssh/config indicating missing trailing newline char in file.

@Byron Byron added bug Something isn't working auth* Issues with authentication and authorisation, usually with forges labels Apr 21, 2024
@Byron
Copy link
Collaborator

Byron commented Apr 22, 2024

By now, there is a new option that allows to use the Git binary for fetch and push.

Screenshot 2024-04-22 at 15 54 01

Would you be able to try this and let us know if it works? Thank you.

@Byron Byron added the feedback requested Feedback was requested to help resolve the issue label Apr 22, 2024
@bripkens
Copy link
Author

@Byron Pushing works 🎉. However, the commit becomes unverified.

image

@Byron
Copy link
Collaborator

Byron commented Apr 23, 2024

That's great to hear!

Regarding the signing issue, my assumption is that you have configured signing in Git, but GitButler commits are not necessarily respecting this configuration yet. However, it is able to sign commits itself using the generated SSH-Key, but it's a GitButler setting which might not be configured here.

@Byron
Copy link
Collaborator

Byron commented Apr 23, 2024

Regarding the unsigned commit, could you share your setup and roughly what you did to get that unsigned commit? (I think I have an idea, but want to be sure). From there, I'd be able to create a new issue and close this one. Thanks again for your help.

@bripkens
Copy link
Author

Sure @Byron

Regarding the unsigned commit, could you share your setup and roughly what you did to get that unsigned commit?

From a UI perspective, I just went into Gitbutler and hit the commit button followed by push. I haven't configured any of Gitbutler's SSH keys/Gitbutler specific signing.

I would personally prefer to rely on Git's native signing capabilities and configuration.

The .gitconfig contains the usual. Also fyi, I can push without getting prompted for a GPG key passphrase (that is, if I have pushed once so far and the GPG session hasn't expired).

[user]
  name = Ben Blackmore
  email = [email protected]
  signingkey = 3C89A8D52B4321F6
[credential]
  helper = osxkeychain
[commit]
  gpgsign = true

@Byron
Copy link
Collaborator

Byron commented Apr 23, 2024

Thanks for the clarification and all the help!

I have created #3586 to capture this issue, and close this one as it appears resolved.

@Byron Byron closed this as completed Apr 23, 2024
@Byron Byron removed the feedback requested Feedback was requested to help resolve the issue label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth* Issues with authentication and authorisation, usually with forges bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants