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

Windows 10 - Permission denied (publickey) #4792

Closed
suriyaa opened this issue May 26, 2018 · 10 comments
Closed

Windows 10 - Permission denied (publickey) #4792

suriyaa opened this issue May 26, 2018 · 10 comments
Labels
more-info-needed The submitter needs to provide more information about the issue

Comments

@suriyaa
Copy link

suriyaa commented May 26, 2018

Description

After upgrading my old GitHub program to GitHub Desktop program. I started contributing to a project at Wikimedia Foundation. I already created a SSH key and added it to GitHub and to my gerrit.wikimedia.org accounts.

Version

  • GitHub Desktop: 1.2.0
  • Operating system: Microsoft Windows 10 [Build Version 15063]

Steps to Reproduce

  1. Open GitHub Desktop
  2. Run this in Powershell in a repo with non-published commits: git review -R

Expected Behavior

Should publish commit to a Git server (in my case: https://gerrit.wikimedia.org)

Actual Behavior

> git review -R
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Additional Information

Logs

In the 2018-05-26.desktop.production.log file:

2018-05-26T14:27:09.600Z - info: [main] Received possible protocol arguments: 2
2018-05-26T14:27:13.060Z - info: [ui] [AppStore] loading 0 repositories from store
2018-05-26T14:27:13.109Z - info: [ui] [Welcome] no sign in step found. ignoring...
2018-05-26T14:27:13.114Z - info: [ui] [Welcome] no sign in step found. ignoring...
2018-05-26T14:27:13.119Z - info: [ui] [Welcome] no sign in step found. ignoring...
2018-05-26T14:27:17.080Z - info: [ui] [Welcome] no sign in step found. ignoring...
2018-05-26T14:27:17.495Z - info: [ui] [Welcome] no sign in step found. ignoring...
2018-05-26T14:27:18.709Z - info: [ui] launching: 1.2.0 (Windows 10.0.15063)
2018-05-26T14:27:18.709Z - info: [ui] execPath: 'C:\Users\Suriyaa\AppData\Local\GitHubDesktop\app-1.2.0\GitHubDesktop.exe'
2018-05-26T14:27:18.768Z - info: [ui] [Welcome] no sign in step found. ignoring...
2018-05-26T14:27:23.681Z - info: [ui] [Welcome] advancing to step: SignInToDotCom
2018-05-26T14:27:23.690Z - info: [ui] [Welcome] current sign in state not found. ignoring...
2018-05-26T14:27:26.484Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 8.953s)
2018-05-26T14:27:31.867Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2018-05-26T14:27:33.084Z - info: [ui] [AppStore] adding account SuriyaaKudoIsc (Suriyaa ✌️️) to store
2018-05-26T14:27:33.102Z - info: [ui] [Welcome] advancing to step: ConfigureGit
2018-05-26T14:27:33.270Z - info: [ui] [Welcome] no sign in step found. ignoring...
2018-05-26T14:27:33.645Z - info: [ui] [Welcome] no sign in step found. ignoring...
2018-05-26T14:27:34.253Z - info: [ui] [Welcome] no sign in step found. ignoring...
2018-05-26T14:27:51.488Z - info: [ui] [Welcome] advancing to step: UsageOptOut
2018-05-26T14:27:54.549Z - info: [ui] Opt out reported.
2018-05-26T14:30:06.522Z - info: [ui] [AppStore] loading 0 repositories from store
2018-05-26T14:30:06.522Z - info: [ui] [AppStore] found account: SuriyaaKudoIsc (Suriyaa ✌️️)
2018-05-26T14:30:07.479Z - info: [ui] launching: 1.2.0 (Windows 10.0.15063)
2018-05-26T14:30:07.479Z - info: [ui] execPath: 'C:\Users\Suriyaa\AppData\Local\GitHubDesktop\app-1.2.0\GitHubDesktop.exe'
2018-05-26T14:30:08.591Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 1.435s)
2018-05-26T14:36:18.701Z - info: [ui] [AppStore] loading 0 repositories from store
2018-05-26T14:36:18.704Z - info: [ui] [AppStore] found account: SuriyaaKudoIsc (Suriyaa ✌️️)
2018-05-26T14:36:19.297Z - info: [ui] launching: 1.2.0 (Windows 10.0.15063)
2018-05-26T14:36:19.298Z - info: [ui] execPath: 'C:\Users\Suriyaa\AppData\Local\GitHubDesktop\app-1.2.0\GitHubDesktop.exe'
2018-05-26T14:36:21.215Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 2.054s)
2018-05-26T14:39:10.872Z - info: [ui] [AppStore] loading 0 repositories from store
2018-05-26T14:39:10.874Z - info: [ui] [AppStore] found account: SuriyaaKudoIsc (Suriyaa ✌️️)
2018-05-26T14:39:11.764Z - info: [ui] launching: 1.2.0 (Windows 10.0.15063)
2018-05-26T14:39:11.764Z - info: [ui] execPath: 'C:\Users\Suriyaa\AppData\Local\GitHubDesktop\app-1.2.0\GitHubDesktop.exe'
2018-05-26T14:39:15.821Z - info: [ui] [AppStore] adding repository at C:\Users\Suriyaa\Documents\GitHub\core to store
2018-05-26T14:39:17.695Z - info: [ui] Executing isUsingLFS: git lfs track (took 1.769s)
2018-05-26T14:39:18.096Z - info: [ui] Executing getAheadBehind: git rev-list --left-right --count b172aff090b7c59c2f602931d469cf3ac5e9e74a...57062b01fdeafa5d63387b45b92bd2350d220a88 -- (took 1.127s)
2018-05-26T14:39:28.917Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 3.294s)
2018-05-26T14:39:28.919Z - error: [ui] `git -c credential.helper= fetch --progress --prune origin` exited with an unexpected code: 128.
suriyaa@gerrit.wikimedia.org: 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. You may not have permission to access the repository or the repository may have been archived. Open options and verify that you're signed in with an account that has permission to access this repository.)
2018-05-26T14:40:37.039Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 1.554s)
2018-05-26T14:40:37.040Z - error: [ui] `git -c credential.helper= fetch --progress --prune origin` exited with an unexpected code: 128.
suriyaa@gerrit.wikimedia.org: 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. You may not have permission to access the repository or the repository may have been archived. Open options and verify that you're signed in with an account that has permission to access this repository.)
2018-05-26T14:40:48.968Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 1.273s)
2018-05-26T14:40:48.968Z - error: [ui] `git -c credential.helper= fetch --progress --prune origin` exited with an unexpected code: 128.
suriyaa@gerrit.wikimedia.org: 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. You may not have permission to access the repository or the repository may have been archived. Open options and verify that you're signed in with an account that has permission to access this repository.)
2018-05-26T14:41:11.749Z - info: [main] Received possible protocol arguments: 1
2018-05-26T14:41:55.465Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 1.214s)
2018-05-26T14:41:55.466Z - error: [ui] `git -c credential.helper= fetch --progress --prune origin` exited with an unexpected code: 128.
suriyaa@gerrit.wikimedia.org: 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. You may not have permission to access the repository or the repository may have been archived. Open options and verify that you're signed in with an account that has permission to access this repository.)
2018-05-26T14:42:06.591Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 1.235s)
2018-05-26T14:42:06.592Z - error: [ui] `git -c credential.helper= fetch --progress --prune origin` exited with an unexpected code: 128.
suriyaa@gerrit.wikimedia.org: 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. You may not have permission to access the repository or the repository may have been archived. Open options and verify that you're signed in with an account that has permission to access this repository.)
2018-05-26T14:51:29.681Z - info: [ui] [AppStore] loading 1 repositories from store
2018-05-26T14:51:29.683Z - info: [ui] [AppStore] found account: SuriyaaKudoIsc (Suriyaa ✌️️)
2018-05-26T14:51:30.512Z - info: [ui] launching: 1.2.0 (Windows 10.0.15063)
2018-05-26T14:51:30.513Z - info: [ui] execPath: 'C:\Users\Suriyaa\AppData\Local\GitHubDesktop\app-1.2.0\GitHubDesktop.exe'
2018-05-26T14:51:31.833Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 1.401s)
2018-05-26T14:51:32.515Z - info: [ui] Executing getAheadBehind: git rev-list --left-right --count b172aff090b7c59c2f602931d469cf3ac5e9e74a...57062b01fdeafa5d63387b45b92bd2350d220a88 -- (took 1.050s)
2018-05-26T14:51:32.542Z - info: [ui] Executing getAheadBehind: git rev-list --left-right --count b172aff090b7c59c2f602931d469cf3ac5e9e74a...57062b01fdeafa5d63387b45b92bd2350d220a88 -- (took 1.179s)
2018-05-26T15:09:50.874Z - info: [ui] [AppStore] loading 1 repositories from store
2018-05-26T15:09:50.876Z - info: [ui] [AppStore] found account: SuriyaaKudoIsc (Suriyaa ✌️️)
2018-05-26T15:09:51.824Z - info: [ui] launching: 1.2.0 (Windows 10.0.15063)
2018-05-26T15:09:51.825Z - info: [ui] execPath: 'C:\Users\Suriyaa\AppData\Local\GitHubDesktop\app-1.2.0\GitHubDesktop.exe'
2018-05-26T15:09:51.947Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 1.075s)
2018-05-26T15:09:53.526Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 1.799s)
2018-05-26T15:09:54.135Z - info: [ui] Executing getAheadBehind: git rev-list --left-right --count b172aff090b7c59c2f602931d469cf3ac5e9e74a...57062b01fdeafa5d63387b45b92bd2350d220a88 -- (took 1.417s)
2018-05-26T15:09:54.255Z - info: [ui] Executing getAheadBehind: git rev-list --left-right --count b172aff090b7c59c2f602931d469cf3ac5e9e74a...57062b01fdeafa5d63387b45b92bd2350d220a88 -- (took 1.035s)
2018-05-26T15:14:42.386Z - info: [ui] [AppStore] loading 1 repositories from store
2018-05-26T15:14:42.389Z - info: [ui] [AppStore] found account: SuriyaaKudoIsc (Suriyaa ✌️️)
2018-05-26T15:14:43.579Z - info: [ui] launching: 1.2.0 (Windows 10.0.15063)
2018-05-26T15:14:43.580Z - info: [ui] execPath: 'C:\Users\Suriyaa\AppData\Local\GitHubDesktop\app-1.2.0\GitHubDesktop.exe'
2018-05-26T15:14:44.931Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 1.480s)
2018-05-26T15:14:46.036Z - info: [ui] Executing getAheadBehind: git rev-list --left-right --count b172aff090b7c59c2f602931d469cf3ac5e9e74a...57062b01fdeafa5d63387b45b92bd2350d220a88 -- (took 1.145s)
2018-05-26T15:14:46.044Z - info: [ui] Executing getAheadBehind: git rev-list --left-right --count b172aff090b7c59c2f602931d469cf3ac5e9e74a...57062b01fdeafa5d63387b45b92bd2350d220a88 -- (took 1.133s)
2018-05-26T15:17:59.250Z - info: [ui] Executing getConfigValueInPath: git config -z trailer.separators (took 4.429s)
2018-05-26T15:18:32.895Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 1.875s)
2018-05-26T15:19:06.764Z - info: [ui] Executing getAheadBehind: git rev-list --left-right --count a3b06d0a2f5c95b6bcb1a6d002ed6b76150e28e9...dca9ce564773c70b229264b60b6a64b565a7d359 -- (took 1.021s)
2018-05-26T15:23:48.421Z - info: [ui] Executing getAheadBehind: git rev-list --left-right --count f80cee4567fc3df58ad6cf2768ddce94408a905f...01b4001e707ea9535810af364fec2b0cba0f5735 -- (took 1.220s)
2018-05-26T15:23:51.779Z - info: [ui] Executing getAheadBehind: git rev-list --left-right --count f80cee4567fc3df58ad6cf2768ddce94408a905f...2e3e7395f1f290fff646510233bf6386fcf01a5d -- (took 3.339s)
2018-05-26T15:23:51.780Z - info: [ui] Executing getConfigValueInPath: git config -z --global user.name (took 2.974s)
2018-05-26T15:23:51.793Z - info: [ui] Executing getCommits: git log HEAD --date=raw --max-count=100 --pretty=%H%x1F%s%x1F%b%x1F%an <%ae> %ad%x1F%cn <%ce> %cd%x1F%P%x1F%(trailers:unfold,only) -z --no-color -- (took 3.078s)
2018-05-26T15:29:17.726Z - info: [ui] Executing getRecentBranches: git log -g --no-abbrev-commit --pretty=oneline HEAD -n 2500 -- (took 4.238s)
2018-05-26T15:29:21.259Z - info: [ui] Executing getBranches: git for-each-ref --format=%(refname)%00%(refname:short)%00%(upstream:short)%00%(objectname)%00%(author)%00%(committer)%00%(parent)%00%(symref)%00%(subject)%00%(body)%00%(trailers:unfold,only)%00%1F refs/heads refs/remotes (took 7.787s)
2018-05-26T15:29:22.513Z - info: [ui] Executing getConfigValueInPath: git config -z trailer.separators (took 1.253s)
2018-05-26T15:29:22.572Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 9.323s)
2018-05-26T15:29:28.653Z - info: [ui] Executing getCommits: git log HEAD --date=raw --max-count=100 --pretty=%H%x1F%s%x1F%b%x1F%an <%ae> %ad%x1F%cn <%ce> %cd%x1F%P%x1F%(trailers:unfold,only) -z --no-color -- (took 5.653s)
2018-05-26T15:33:38.891Z - info: [ui] [AppStore] loading 1 repositories from store
2018-05-26T15:33:38.893Z - info: [ui] [AppStore] found account: SuriyaaKudoIsc (Suriyaa ✌️️)
2018-05-26T15:33:40.115Z - info: [ui] launching: 1.2.0 (Windows 10.0.15063)
2018-05-26T15:33:40.115Z - info: [ui] execPath: 'C:\Users\Suriyaa\AppData\Local\GitHubDesktop\app-1.2.0\GitHubDesktop.exe'
2018-05-26T15:33:42.002Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 2.095s)
2018-05-26T15:34:06.594Z - info: [ui] Executing getAheadBehind: git rev-list --left-right --count f80cee4567fc3df58ad6cf2768ddce94408a905f...57062b01fdeafa5d63387b45b92bd2350d220a88 -- (took 25.131s)
2018-05-26T15:46:06.540Z - info: [ui] Executing getConfigValueInPath: git config -z --global user.name (took 2.172s)
2018-05-26T15:50:27.021Z - info: [ui] [AppStore] loading 1 repositories from store
2018-05-26T15:50:27.024Z - info: [ui] [AppStore] found account: SuriyaaKudoIsc (Suriyaa ✌️️)
2018-05-26T15:50:27.690Z - info: [ui] launching: 1.2.0 (Windows 10.0.15063)
2018-05-26T15:50:27.691Z - info: [ui] execPath: 'C:\Users\Suriyaa\AppData\Local\GitHubDesktop\app-1.2.0\GitHubDesktop.exe'
2018-05-26T15:50:29.341Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 1.867s)
2018-05-26T15:50:44.057Z - info: [ui] Executing getAheadBehind: git rev-list --left-right --count b172aff090b7c59c2f602931d469cf3ac5e9e74a...57062b01fdeafa5d63387b45b92bd2350d220a88 -- (took 4.067s)
2018-05-26T15:52:41.610Z - info: [ui] Executing getAheadBehind: git rev-list --left-right --count 52a62f036b0e5701e51b146d39537bb7bfdf6a88...57062b01fdeafa5d63387b45b92bd2350d220a88 -- (took 1.068s)
2018-05-26T15:59:04.120Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 2.442s)
2018-05-26T15:59:04.122Z - error: [ui] `git -c credential.helper= fetch --progress --prune origin` exited with an unexpected code: 128.
suriyaa@gerrit.wikimedia.org: 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. You may not have permission to access the repository or the repository may have been archived. Open options and verify that you're signed in with an account that has permission to access this repository.)
@steveward
Copy link
Member

👋 @SuriyaaKudoIsc. We have a help article that walks through how to resolve these permission denied errors. If you continue to run into errors, please share the output of the following command:

ssh -vT git@gerrit.wikimedia.org

@suriyaa
Copy link
Author

suriyaa commented May 29, 2018

🖖 @steveward This is the (German) output of ssh -vT git@gerrit.wikimedia.org:

PS C:\WINDOWS\system32> ssh -vT git@gerrit.wikimedia.org
ssh : Die Benennung "ssh" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren
Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern enthalten), und
wiederholen Sie den Vorgang.
In Zeile:1 Zeichen:1
+ ssh -vT git@gerrit.wikimedia.org
+ ~~~
    + CategoryInfo          : ObjectNotFound: (ssh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\WINDOWS\system32>

@steveward steveward added the more-info-needed The submitter needs to provide more information about the issue label May 29, 2018
@steveward
Copy link
Member

@SuriyaaKudoIsc Can you download Git for Windows and try running the command from there? I also forgot to link to our help article that walks through how to resolve this in my initial reply -- sorry about that! Here it is:

https://help.github.com/articles/error-permission-denied-publickey/

@suriyaa
Copy link
Author

suriyaa commented Jun 13, 2018

@steveward The output in Git for Windows:

Suriyaa@Suriyaa MINGW64 ~
$ ssh -vT git@gerrit.wikimedia.org
OpenSSH_7.6p1, OpenSSL 1.0.2l  25 May 2017
debug1: Reading configuration data /c/Users/Suriyaa/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to gerrit.wikimedia.org [208.80.154.85] port 22.
debug1: connect to address 208.80.154.85 port 22: Connection timed out
debug1: Connecting to gerrit.wikimedia.org [2620:0:861:3:208:80:154:85] port 22.
debug1: connect to address 2620:0:861:3:208:80:154:85 port 22: Software caused connection abort
ssh: connect to host gerrit.wikimedia.org port 22: Software caused connection abort

Suriyaa@Suriyaa MINGW64 ~
$

@steveward
Copy link
Member

@SuriyaaKudoIsc Did you possibly generate that key using PuTTY? The error you are receiving is common with keys generated by PuTTY. We recommend using Git for Windows to generate SSH keys.

@suriyaa
Copy link
Author

suriyaa commented Jun 26, 2018

@steveward I generated the key in Git.

@suriyaa
Copy link
Author

suriyaa commented Aug 12, 2018

I think this problem is solved. I'll open a new issue ticket if I get this issue again.

@suriyaa suriyaa closed this as completed Aug 12, 2018
@schiemaxDD
Copy link

schiemaxDD commented Dec 3, 2021

Hi Suriyaa,

how did you manage to solve your authentication issue back then? ;D

on executing > ssh -vT git@github.com

i'm having the error "git@github.com: Permission denied (publickey)."

The pub key is deployed to the SSH keys page on Github already.

Greetings Mario

@ShadowWalker918
Copy link

Thanks

@steveward
Copy link
Member

@schiemaxDD see this guide or troubleshooting permission denied ssh key errors. If you're having issues with GitHub Desktop please open up a new issue and fill out the template. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-info-needed The submitter needs to provide more information about the issue
Projects
None yet
Development

No branches or pull requests

4 participants