Closed parthe closed 4 years ago
@parthe thanks for contributing. Could you upload the log file from GitHub Desktop so that I could get some more information about this error? To access the log files go to the file menu in GitHub Desktop and select Help
> Show Logs in Finder (macOS) or Explorer (Windows)
.
The log files are created daily -- please upload a log file as an attachment from a day where you experienced the issue.
Maybe I've missed something in all the other discussion in other issues like #6538 and #7982 , but nothing here seems to address the issue for me.
Mac OS Catalina 10.15.2 Github Desktop 2.2.4
Fresh upgrade from legacy version of Github Desktop where everything worked fine. The authentication issue has been the same no matter what I've tried.
Sequence of things I've done.
https://github.com/settings/keys
Nothing changes. I get this message every time.
Here's what's in the log from the last attempt. It's the same message regardless of which repo I attempt to clone.
2020-01-10T18:15:24.525Z - info: [ui] [AppStore.getAccountForRemoteURL] account found for remote: https://github.com/ninelabs/loopsbook.git - jcornelius (has token)
2020-01-10T18:15:25.034Z - error: [ui] `git -c credential.helper= -c protocol.version=2 clone --recursive --progress -- https://github.com/ninelabs/loopsbook.git /Users/jc/Web Projects/loopsbook` exited with an unexpected code: 128.
stderr:
Cloning into '/Users/jc/Web Projects/loopsbook'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Anyone have ideas on how to resolve this?
Maybe I've missed something in all the other discussion in other issues like #6538 6538 and #7982 , but nothing here seems to address the issue for me.
I'm here because i got notified from the 6538.
6538 was about issue using ssh keys with github desktop where we were trying to pull/push to a remote with the address like ssh://user@domain:/dir/to/project
, but ssh key's passphrase was being a problem.
Maybe #8041 or #5291 can be helpful?
@jcornelius You deleted the old SSH keys, but did you create a new one? instructions are here: https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
@tierninho I didn't since the app didn't seem to want one. Now I have created a new SSH key and added to my profile on Github. The app still throws the same error.
FWIW: I can use the command line to clone and push.
Update:
It still doesn't work. Here's the log:
2020-01-10T20:34:29.846Z - info: [ui] [AppStore] loading 0 repositories from store
2020-01-10T20:34:30.057Z - info: [ui] Opt in reported.
2020-01-10T20:34:30.174Z - info: [ui] [Welcome] no sign in step found. ignoring...
2020-01-10T20:34:30.437Z - info: [ui] [Welcome] no sign in step found. ignoring...
2020-01-10T20:34:30.927Z - info: [ui] launching: 2.2.4 (Mac OS 10.15.2)
2020-01-10T20:34:30.938Z - info: [ui] execPath: '/Applications/GitHub Desktop.app/Contents/Frameworks/GitHub Desktop Helper.app/Contents/MacOS/GitHub Desktop Helper'
2020-01-10T20:34:30.952Z - info: [ui] [Welcome] no sign in step found. ignoring...
2020-01-10T20:34:31.032Z - info: [ui] [Welcome] no sign in step found. ignoring...
2020-01-10T20:34:32.609Z - info: [ui] [Welcome] advancing to step: SignInToDotCom
2020-01-10T20:34:32.614Z - info: [ui] [Welcome] current sign in state not found. ignoring...
2020-01-10T20:34:48.562Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-01-10T20:34:52.197Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-01-10T20:34:55.155Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-01-10T20:35:02.149Z - info: [ui] [Welcome] kind TwoFactorAuthentication is the same as TwoFactorAuthentication. ignoring...
2020-01-10T20:35:02.848Z - info: [ui] [AppStore] adding account jcornelius (J Cornelius) to store
2020-01-10T20:35:02.865Z - info: [ui] [Welcome] advancing to step: ConfigureGit
2020-01-10T20:35:02.965Z - info: [ui] [Welcome] no sign in step found. ignoring...
2020-01-10T20:35:03.047Z - info: [ui] [Welcome] no sign in step found. ignoring...
2020-01-10T20:35:03.591Z - info: [ui] [Welcome] no sign in step found. ignoring...
2020-01-10T20:35:07.876Z - info: [ui] [Welcome] advancing to step: UsageOptOut
2020-01-10T20:35:09.591Z - info: [ui] Opt in reported.
2020-01-10T20:35:09.597Z - info: [ui] [Welcome] no sign in step found. ignoring...
2020-01-10T20:36:53.101Z - info: [ui] [AppStore.getAccountForRemoteURL] account found for remote: https://github.com/jcornelius/jcornelius.com.git - jcornelius (has token)
2020-01-10T20:36:53.637Z - error: [ui] `git -c credential.helper= -c protocol.version=2 clone --recursive --progress -- https://github.com/jcornelius/jcornelius.com.git /Users/jc/Web Projects/jcornelius.com` exited with an unexpected code: 128.
stderr:
Cloning into '/Users/jc/Web Projects/jcornelius.com'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
(The error was parsed as 2: Authentication failed. Some common reasons include:
- You are not logged in to your account: see GitHub Desktop > Preferences.
- You may need to log out and log back in to refresh your token.
- You do not have permission to access this repository.
- The repository is archived on GitHub. Check the repository settings to confirm you are still permitted to push commits.
- If you use SSH authentication, check that your key is added to the ssh-agent and associated with your account.)
I attempted to clone the same repo, and did so successfully. 🤔
Can you run ssh -T git@github.com
which may require your password and report back.
cc @steveward for any ideas here
Can you run
ssh -T git@github.com
which may require your password and report back.
$ ssh -T git@github.com
Enter passphrase for key '/Users/jc/.ssh/id_rsa':
Hi jcornelius! You've successfully authenticated, but GitHub does not provide shell access.
/cc @tierninho
GitHub still isn't able to authenticate you despite just setting up the SSH keys on your account. You can also use the HTTPS instead, but SSH should still work ideally.
GitHub has a help page specifically for that error message here which might help. Could also be the SSH agent or the git remote.
For whatever strange reason, running ssh-add /path/to/key
solved it. Thanks, @tierninho.
Awesome, thanks for the confirmation!
my password was good in github desktop preferences but wrong in the .git/config file
for me the only working solution was to manually edit the file: .git/config
that contains this line: url = https://user:password@github.com/user/repo.git
change password to the GOOD password because it was an older one for me
I had the same Problem as @jcornelius. When i tried to clone my repos, the access at my gitlab-server was denied. But i used github desktop on a diffrent pc with this server bevor. I solved it, with cloning a repo with visual studio code and added the local repo. I updated the branch with the "fetch origin button" and just then github deskop asked me the first time for my account credentials for gitlab. I tipped them in and now its working! Hopefully this is helpfull.
I had the same problem but I return this:
$ ssh -T git@github.com
git@github.com: Permission denied (publickey).
Same problem here, could not authenticate and clone the repository to my local MBP. made it work after logging out and logging back in to Github Desktop
I suppose that everyone here is trying to understand why Github Desktop stopped working when you start using SSH keys. So I've been trying to understand why Github Desktop didn't work with SSH and after doing a test, I realized that Git Bash works perfectly with SSH keys, BUT Gitbub Desktop only works if the repository is configured as HTTP. That is:
Git Bash works with
git@github.com:alexandre-liberato/project-curso-git.git
and with
BUT Github Desktop ONLY WORKS with
Well, I should have read the MANUAL before start using it. Here is what Github says about Github Desktop: https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/about-connections-to-github
GitHub Desktop connects to GitHub using HTTPS. If you use GitHub Desktop to access repositories that were cloned using SSH, you may encounter errors. To connect to a repository that was cloned using SSH, change the remote's URLs. For more information, see "Changing a remote's URL."
So, the problem is how Github handles SSH keys. I could not find a way to force it to use SSH keys and there is no place to configure Github Desktop to use SSH keys.
Question: Does anyone know how to configure both separately so that Git Bash uses SSH and Github Desktop uses HTTP?
same problems here. will not connect throwing up all errors shown above. Anyone manage to get past the git@github.com: Permission denied (publickey).
I know this may seem like a 'Do'h' kind of thing, but I received this error when trying to push from an account that didn't have write access to the origin. Simple oversight on my part, but I didn't notice off the bat until I saw a notice near my commit comment area about write access.
Signout and sign in worked for me . https://stackoverflow.com/questions/24960247/how-do-i-sign-out-of-the-desktop-version-of-github/24960299
I had same problem after I had updated a bunch of things (macos to Mojave, updated github desktop, and on github added 2 part SMS login verification). What fixed it was when I went to Github Desktop preferences, and logged in from there. It said it would login VIA my browser, where I was already logged in to gitHub, and sure enough it blinks my browser and comes back successful (I didn't have to enter userid or password or anything), and the problem was fixed.
I forgot to add the -t rsa
or -t ed25519
option to the ssh-keygen
command so my key wasn't the right type. Solution was to generate a new key and then everything started working again.
Same problem. Found in the log:
ssh_askpass: exec(/usr/X11R6/bin/ssh-askpass): No such file or directory
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
This was the main culprit for me. If you can reproduce the same then i guess GitHub needs to improve for this https://github.com/desktop/desktop/issues/12484
I can verify that generating a new SSH key fixed the problem for me. GitHub
I did all the thing listed above, still did not work..... until I uncheck the options : Use system openSSH, that options is under the menu Files/Options/Advanced
When I met a problem as below. (GitHub Desktop: Version 2.9.4, x64)
log was
2021-11-25T05:08:50.023Z - error: [ui] `git -c credential.helper= -c protocol.version=2 fetch --progress --prune origin` exited with an unexpected code: 128.
stderr:
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
(The error was parsed as 2: Authentication failed. Some common reasons include:
- You are not logged in to your account: see File > Options.
- You may need to log out and log back in to refresh your token.
- You do not have permission to access this repository.
- The repository is archived on GitHub. Check the repository settings to confirm you are still permitted to push commits.
- If you use SSH authentication, check that your key is added to the ssh-agent and associated with your account.
- If you use SSH authentication, ensure the host key verification passes for your repository hosting service.
- If you used username / password authentication, you might need to use a Personal Access Token instead of your account password. Check the documentation of your repository hosting service.)
ssh -T git@github.com
github.com
lines in my C:\Users\%USERNAME%\.ssh\known_hosts
.git remote rm origin
This worked for me.
I did all the thing listed above, still did not work..... until I uncheck the options : Use system openSSH, that options is under the menu Files/Options/Advanced
This worked for me as well.
Use system openSSH
this option is not available for me.
I'm using ubuntu deb version of the Github Desktop
I did all the thing listed above, still did not work..... until I uncheck the options : Use system openSSH, that options is under the menu Files/Options/Advanced
This is the only thing that worked for me, thank you!!
I was facing same issue. Solution: 1] Open Github Desktop 2] Navigate to Files/Options/Advanced 3] Signout your account. 4] Now close the Github Desktop and open it again 5 ]Navigate to Files/Options/Advanced 6] Click on Signin 7] It will ask you to open default browser 8] Go ahead and give credentials. 9] This is worked for me.
If you are still facing issue Follow thses different steps https://github.com/desktop/desktop/issues/8860
What worked for me was removing the project from the list and adding it again.
I ran into this when I changed the remote repository through the console.
I ran into this issue on 03/23/2023 and this helped me in resolving: https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/
Using the blog post above I ran ssh-keygen -R github.com
in a terminal and then Github saved the new known_host ssh value the next time I tried to push from Github Desktop.
The above worked for me as well.
Just sign out of the GitHub desktop and then sign in again with the browser. :/ - Worked for me.
1-sign out 2-sing in you good to go
Re-clone the repo worked for me
~/Devs/signalforex on master *2 ❯ git -c credential.helper= fetch --progress --prune --recurse-submodules=on-demand origin
Warning: the ECDSA host key for 'github.com' differs from the key for the IP address '140.82.112.3'
Offending key for IP in /Users/brenoperucchi/.ssh/known_hosts:10
Matching host key in /Users/brenoperucchi/.ssh/known_hosts:33
Are you sure you want to continue connecting (yes/no)?
Delete line /Users/brenoperucchi/.ssh/known_hosts:10
❯git -c credential.helper= fetch --progress --prune --recurse-submodules=on-demand origin
Now everything should be fine
I keep getting random emails from this months later, its so weird.
For commit in organizations:
go to https://github.com/organizations/NAME-ORG/settings/oauth_application_policy
Remove Third-party application access policy, it should look something like this:
worked for me
Reason: Old SSH auth key was removed,
Solution: Worked for me.
Only remove local cloned repo.
(Skip if you are choosing new clone location)
Download and install SourceTree
Login GitHub Account using
Host Github Auth Type: OAuth Protocol: SSH
Then, Click on Connect Account.
Copy generated SSH Key value to click on
Copy to Clipboard
button
In the "Access" section of the sidebar, click SSH and GPG keys.
Click New SSH key or Add SSH key.
In the "Title" field, add a descriptive label for the new key. For example, if you're using a personal laptop, you might call this key "Personal laptop".
Select the type of key, either authentication or signing. For more information about commit signing, see "About commit signature verification."
In the "Key" field, paste your public key.
Click Add SSH key.
And, Go back to SourceTree app to save details.
You good to go!
maybe use proxy tools, change proxy node its work
I use github desktop to connect to gitlab account repos and it's worked fine for a few years. Confirmed my secret key still has several months left before it expires.
I haven't changed anything and now I can't seem to push. I'm not signed in under options to github (since it's a gitlab account) and there's no option to sign in to gitlab under options or repo specific.
Figured it out. I needed to sign in with my gitlab email and PAT (personal access token). I have no idea why after years of being signed in, github desktop decided to sign me out without mentioning and then show in the UI that I was signed in. The PAT also remained unchanged.
Go to credential manager and remove
Eu desmarquei a chave SSH e marquei use Git credencial Manager e funcionou. espero que ajude.
I am unable to pull, push for a private repository through the GitHub Desktop interface. However, the commands and work perfectly fine when I run them through the command prompt i.e.(Repository -> Open in Command Prompt)
A clear and concise description of what the bug is. When I try "Fetch Origin" or "Push" from the GUI of the GitHub Desktop, it shows me the following
I have ruled out the possibility of all the 5 error messages the interface shows me.
Furthermore, if I uninstall GitHub Desktop and reinstall it, the installation interface does not ask me for any login, i.e., it does not completely delete all files during uninstallation (and perhaps uses some old credentials).
I tried removing all files in the GitHub folder where the installation was done and then reinstalling the GitHub Desktop app, but saw the same behavior.
It is not clear what the backend is for commands clicked via the GitHub Desktop GUI
Version & OS
GitHub Desktop 2.2.4 on Windows 10 Pro