You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
I can't connect to my own repository; I have never changed the default security settings. #2453
I am trying to setup my local Git repository so I can push updates to my GitHub repository. I am currently logged into GitHub, on the same machine that my local Git is on. I just went through the steps in the desktop app, (yes I am signed into the app with the same account) and was able to stage and compare, but I cannot commit; I get a message saying I don't have permission?? It's mine! I looked everywhere in GitHub settings, I don't see any additional permissions I could possibly give myself.
"Authentication failed. You may not have permission to access the repository. Open options and verify that you're signed in with an account that has permission to access this repository."
GitHub Desktop
Version 0.7.2
Windows 10
GitHub Desktop version: 0.7.2
OS version: Windows 10
Steps to Reproduce
Log into GitHub Desktop
Add local repository
Write summary and description
Leave default branch: master
Click "Publish branch"
Receive error message: "Authentication failed. You may not have permission to access the repository. Open options and verify that you're signed in with an account that has permission to access this repository."
The help documentation had nothing to suggest that I did not already do.
Expected behavior: [What you expected to happen]
Actual behavior: [What actually happened]
Reproduces how often: [What percentage of the time does it reproduce?]
@I-keep-trying there's a couple of things I'd like you to check to confirm nothing unexpected is occurring with your setup:
From the app, could you open View | Toggle Developer Tools when this occurs and share the underlying error? It should be logged to the console.
From the app, could you open File | Options and confirm you have a GitHub account registered? This is what my setup looks like:
From the Start Menu, could you open Credential Manager, select the Windows Credentials tab and see if there are any GitHub credentials listed under the "Generic Credentials" group? This is what it looks like on my machine:
Hello Brendan,
Thanks for your quick response! I was beginning to worry I had created a bug report over nothing, but I have verified everything and I still have the same problem :(
Yes I was logged in yesterday, here is what it looked like then and just now:
I copied all the error messages I found (thanks for the tip on Developer Tools!) and just pasted them all together in the attached log. Thanks again,
Andrea -1502654604997.txt
renderer.js:1 `git -c credential.helper= fetch --progress --prune origin` exited with an unexpected code: 128.
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. Open options and verify that you're signed in with an account that has permission to access this repository.)
error @ renderer.js:1
Could you open the repository in the command line and run this command? I want to confirm the remote URLs for your repository is HTTPS, not SSH - this might be the issue.
git remote -vv
This error is also interesting (seems to happen on every network call) but is not an error I've come across before. This is probably separate to the Git issue.
renderer.js:1 fetchAccount: failed with endpoint https://api.github.com
TypeError: Failed to execute 'fetch' on 'Window': Invalid value
Here's what I get when I enter git remote -vv (plus a few other commands I tried just for fun.)
I don't think I'm behind a proxy, but I guess I could be... my boyfriend plays games online, I guess it's possible he's got us set up in a way that mimics a proxy. Is there a way for me to test?
I couldn't recall the screenshot, but I think you had SSH remotes configured for the repository. I'd recommend changing these over to HTTPS to see if that addresses the issue.
For what it's worth, checking my IP on a "what's my IP" web site against ipconfig matches. Seems like if there was a proxy it wouldn't match, right?
Possibly, but I don't think that's the issue here. Just something that I like to check whenever we encounter a potential networking issue.
Ha, I got self conscious and took the screenshot down, thinking I might have overexposed myself... with DHCP my IP changes once in a while, but still.
Is SSH remote for using over command line? And HTTPS for the desktop app? If that's the case, it would make sense, because I first started using Git via command line, then decided to learn how to use the desktop app - I thought it might be easier for just getting stuff done. However, the problem appeared initially in the command line response, so I think I may have just answered my own question. Where is SSH configuration done? I don't remember ever setting or changing this, (not that I didn't I just don't remember at the moment) or why I would have done so (that's the problem with following step by step instructions and not really understanding them sometimes).
Sorry for all the questions - I'm trying to learn everything at once: programming in general, starting with JavaScript (deep into YDKJS), Git and GitHub, Ubuntu (I killed it trying to upgrade- not messing with it for now), and doing it all on my own with help from Stack Exchange, reddit, and people like you. I really appreciate your continued support!
I have a brand new project I'm starting for Free Code Camp, so I have an opportunity to begin a new repository. I really want and need to learn proper Git/GitHub so I can be ready for a junior position SOON. I even made myself another GitHub user so I can pretend to be two people on a project, once I get past this issue. Maybe I should just start fresh with the other account, with the new project, and see what happens?
OK, just for the sake of being thorough, I looked around, and I cannot see anywhere, either in the desktop app settings, nor in the settings for any repository, nor in my GitHub profile settings, where I would go about doing SSH remote configuration. I don't even know what that is, let alone how to change it to HTTPS.
:( UPDATE:
Solved!! :-)
My boyfriend got tired of my loud sighing and took a look. Turns out I have had a long-standing misconception, confirmation bias, call it what you will, that Windows and Bash are mutually exclusive; therefore, when I was performing command-line actions, they only worked to a point. After finding the git/bin sh --login for me, and then made a key that I copied into my GitHub settings, only THEN was I able to do a "git remote show" without getting the "you do not have permission" error message. Seems strange that the line is drawn arbitrarily there; why is it possible to do some git commands without bash, but not others? I would prefer it not allow any, so you are forced to set everything up correctly from the start. But I'm sure it's evolving just like everything else.
I still don't have a HTTPS solution, however; I'd still like to know how that works, if possible. I'll keep trying - username checks out, lol...
I thank you for answer too, I've just losted 5 hours for resolve that problem with my win10, I changed windows credential and it solved my problem
Control panel > User Accounts > Windows Credential
Hello, I have the same problem!
I think the problem is because of shh keys.
When I first time installed git in 2016 and just launched github.desktop. Was created key github_rsa.
In 2017 I started work with git console and created a new key id_rsa (as in guide above) and added it to the github account. it still working for now well by the console.
But github desktop, i think, is trying to use my github_rsa which invalid:
"Key is invalid. It must begin with 'ssh-ed25519', 'ssh-rsa', 'ssh-dss', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'. Check that you're copying the public half of the key "
and i can't add it to github profile.
Github.Desktop use password from github.com but console use another one. I think it is bacause of different ssh keys.
How to "meet" working key with github desktop?
I can't understand how this issue is closed. Ignoring completely that Github Desktop ignores WSL and uses it's own mini-fake-unix setup, even with Git Bash running, ssh-agent running, either before Github Desktop is started or started from Github Desktop, or both, Github Desktop fails to authenticate remotes using the SSH protocol.
All git commands run from Git Bash work -- not that I'd ever want to use Git Bash (see lack of WSL support above).
Add to that, there's a total dearth of documentation. Go to the Github Desktop documentation site, search for "SSH", and get nothing back.
I am probably uninstalling this from my desktop. Having too many issues in Windows 10. Will give it a chance but...
(1) Having the issue described above, which as been closed without a fix.
(2) Local Git location not detected when I attempt to open a command prompt.
(2a) Doesn't even ask for the location of my local Git binary location. Just assumes it is not there.
Scary stuff when the an application charged with helping me manage Git and GitHub is unable to handle Git and GitHub security.
I am still having an issue with this too. Git Bash works totally fine with ssh setup. However GitHub desktop is not even allowing me to specify which generic credential to use when I try to fetch from origin. I have synced ALL of my github related generic credentials to my account on github and I'm still getting this: "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."
The under lying error is this:
`git -c credential.helper= fetch --progress --prune origin` exited with an unexpected code: 128.
[email protected]: 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.)
@I-keep-trying I'm glad you were able to work around the issue!
Is SSH remote for using over command line? And HTTPS for the desktop app?
Both SSH and HTTPS are supported over the command line. We haven't spent much time on SSH support in the Desktop app, but if you have an external setup it can be detected.
HTTPS authentication and SSH authentication differ in a few ways:
HTTPS credentials are stored by a credential manager configured in Git, SSH keys are managed external to Git by an agent process
HTTPS credentials are usually specific to a server (account-based), SSH keys - once the public key is shared like you added it to GitHub - can be used across many servers (identity-based)
HTTPS authentication is done for each connection (simpler, but limited), SSH authentication is done for each session (multiple commands can be run in a session, more complex to manage, but SSH is a well-known protocol)
Where is SSH configuration done?
We have a guide for doing this yourself, but I haven't tested that this integrates nicely with Desktop - I expect this to work, but maybe I've missed something.
OK, just for the sake of being thorough, I looked around, and I cannot see anywhere, either in the desktop app settings, nor in the settings for any repository, nor in my GitHub profile settings, where I would go about doing SSH remote configuration. I don't even know what that is, let alone how to change it to HTTPS.
So the thing you're looking to configure is all specific to your local machine and covered by the guide I linked to above:
you have an SSH public/private keypair on your machine
the public key is added to GitHub, so GitHub knows who you are
ssh-agent process is running, to handle requests from Git when connecting to GitHub over SSH
your ~/.ssh/config entry points to your SSH keys
It's not the most user friendly experience, which is why Desktop will default to cloning over HTTPS. But we've had some pain points that users have encountered when dealing with SSH remotes, I'm going to roll them up into an issue this week and see if we can make this better.
Thanks for all the details, and best of luck in your adventures! Let me know if there's any other questions you have around this...
Hi, I tried following your steps but I still have the error message shown in GitHub Desktop "The repository does not seem to exist anymore. You may not have access, or it may have been deleted or renamed."
I can access the repo from the command line, just not through GitHub Desktop which is a bit annoying.
I have generated the new SSH key and added it to my GitHub account but I don't see any step for making GitHub Desktop use the new SSH key?
I am on Ubuntu so I cannot use the alternate ssh program as suggested by steveward
Activity
shiftkey commentedon Aug 13, 2017
@I-keep-trying there's a couple of things I'd like you to check to confirm nothing unexpected is occurring with your setup:
From the app, could you open View | Toggle Developer Tools when this occurs and share the underlying error? It should be logged to the console.
From the app, could you open File | Options and confirm you have a GitHub account registered? This is what my setup looks like:
I-keep-trying commentedon Aug 13, 2017
Hello Brendan,
Thanks for your quick response! I was beginning to worry I had created a bug report over nothing, but I have verified everything and I still have the same problem :(
Yes I was logged in yesterday, here is what it looked like then and just now:
I did not think to check my Windows credentials yesterday, and for a moment I thought that might fix it. When I checked, the username field was blank, so I updated it, so that's why it says "Modified: Today". But after adding my username, I tried to publish again, and got the same error as yesterday. Also, as you can see, I only have credentials for https://api.github.com, not for https://github.com, like you do, am I supposed to?
I copied all the error messages I found (thanks for the tip on Developer Tools!) and just pasted them all together in the attached log. Thanks again,
Andrea
-1502654604997.txt
I-keep-trying commentedon Aug 13, 2017
Oops I thought "close and comment" meant to close the message, not the issue!
I-keep-trying commentedon Aug 13, 2017
Well I added https://github.com to my Windows credentials, and still cannot publish. :(
shiftkey commentedon Aug 13, 2017
@I-keep-trying thanks for the log file. It looks like you have everything configured right.
It looks like one of the repositories you are using is https://github.com/i-keep-trying/fccRandomQuote - is that one that fails to fetch? I ask because it's a public repository, and it's raising the error on fetch (which it shouldn't need to do).
Could you open the repository in the command line and run this command? I want to confirm the remote URLs for your repository is HTTPS, not SSH - this might be the issue.
This error is also interesting (seems to happen on every network call) but is not an error I've come across before. This is probably separate to the Git issue.
Are you behind a proxy server?
I-keep-trying commentedon Aug 14, 2017
Here's what I get when I enter
git remote -vv(plus a few other commands I tried just for fun.)I don't think I'm behind a proxy, but I guess I could be... my boyfriend plays games online, I guess it's possible he's got us set up in a way that mimics a proxy. Is there a way for me to test?
EDIT: Removed image
I-keep-trying commentedon Aug 14, 2017
For what it's worth, checking my IP on a "what's my IP" web site against ipconfig matches. Seems like if there was a proxy it wouldn't match, right?
shiftkey commentedon Aug 27, 2017
@I-keep-trying apologies for the delay in replying.
I couldn't recall the screenshot, but I think you had SSH remotes configured for the repository. I'd recommend changing these over to HTTPS to see if that addresses the issue.
Possibly, but I don't think that's the issue here. Just something that I like to check whenever we encounter a potential networking issue.
I-keep-trying commentedon Aug 28, 2017
Ha, I got self conscious and took the screenshot down, thinking I might have overexposed myself... with DHCP my IP changes once in a while, but still.
Is SSH remote for using over command line? And HTTPS for the desktop app? If that's the case, it would make sense, because I first started using Git via command line, then decided to learn how to use the desktop app - I thought it might be easier for just getting stuff done. However, the problem appeared initially in the command line response, so I think I may have just answered my own question. Where is SSH configuration done? I don't remember ever setting or changing this, (not that I didn't I just don't remember at the moment) or why I would have done so (that's the problem with following step by step instructions and not really understanding them sometimes).
Sorry for all the questions - I'm trying to learn everything at once: programming in general, starting with JavaScript (deep into YDKJS), Git and GitHub, Ubuntu (I killed it trying to upgrade- not messing with it for now), and doing it all on my own with help from Stack Exchange, reddit, and people like you. I really appreciate your continued support!
I have a brand new project I'm starting for Free Code Camp, so I have an opportunity to begin a new repository. I really want and need to learn proper Git/GitHub so I can be ready for a junior position SOON. I even made myself another GitHub user so I can pretend to be two people on a project, once I get past this issue. Maybe I should just start fresh with the other account, with the new project, and see what happens?
I-keep-trying commentedon Aug 28, 2017
OK, just for the sake of being thorough, I looked around, and I cannot see anywhere, either in the desktop app settings, nor in the settings for any repository, nor in my GitHub profile settings, where I would go about doing SSH remote configuration. I don't even know what that is, let alone how to change it to HTTPS.
:(
UPDATE:
Solved!! :-)
My boyfriend got tired of my loud sighing and took a look. Turns out I have had a long-standing misconception, confirmation bias, call it what you will, that Windows and Bash are mutually exclusive; therefore, when I was performing command-line actions, they only worked to a point. After finding the git/bin sh --login for me, and then made a key that I copied into my GitHub settings, only THEN was I able to do a "git remote show" without getting the "you do not have permission" error message. Seems strange that the line is drawn arbitrarily there; why is it possible to do some git commands without bash, but not others? I would prefer it not allow any, so you are forced to set everything up correctly from the start. But I'm sure it's evolving just like everything else.
I still don't have a HTTPS solution, however; I'd still like to know how that works, if possible. I'll keep trying - username checks out, lol...
2 remaining items
testautomation-01-2018 commentedon Jan 21, 2018
I thank you for answer too, I've just losted 5 hours for resolve that problem with my win10, I changed windows credential and it solved my problem
Control panel > User Accounts > Windows Credential
EugeneAndrievsky commentedon Feb 14, 2018
Hello, I have the same problem!
I think the problem is because of shh keys.
When I first time installed git in 2016 and just launched github.desktop. Was created key github_rsa.
In 2017 I started work with git console and created a new key id_rsa (as in guide above) and added it to the github account. it still working for now well by the console.
But github desktop, i think, is trying to use my github_rsa which invalid:
"Key is invalid. It must begin with 'ssh-ed25519', 'ssh-rsa', 'ssh-dss', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'. Check that you're copying the public half of the key "
and i can't add it to github profile.
Github.Desktop use password from github.com but console use another one. I think it is bacause of different ssh keys.
How to "meet" working key with github desktop?
dcsobral commentedon Apr 1, 2018
I can't understand how this issue is closed. Ignoring completely that Github Desktop ignores WSL and uses it's own mini-fake-unix setup, even with Git Bash running, ssh-agent running, either before Github Desktop is started or started from Github Desktop, or both, Github Desktop fails to authenticate remotes using the SSH protocol.
All git commands run from Git Bash work -- not that I'd ever want to use Git Bash (see lack of WSL support above).
Add to that, there's a total dearth of documentation. Go to the Github Desktop documentation site, search for "SSH", and get nothing back.
mrg123 commentedon Apr 3, 2018
I set ssh by git,create new ssh and final work again. thinks
dturrin-work commentedon Jun 13, 2018
I can't believe this issue was closed????? Wow!
I am probably uninstalling this from my desktop. Having too many issues in Windows 10. Will give it a chance but...
(1) Having the issue described above, which as been closed without a fix.
(2) Local Git location not detected when I attempt to open a command prompt.
(2a) Doesn't even ask for the location of my local Git binary location. Just assumes it is not there.
Scary stuff when the an application charged with helping me manage Git and GitHub is unable to handle Git and GitHub security.
pnally commentedon Feb 25, 2019
I am still having an issue with this too. Git Bash works totally fine with ssh setup. However GitHub desktop is not even allowing me to specify which generic credential to use when I try to fetch from origin. I have synced ALL of my github related generic credentials to my account on github and I'm still getting this:
"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."The under lying error is this:
steveward commentedon Apr 19, 2019
@fthomas54 does your SSH key have a passphrase associated with it?
You may also need to follow the steps here to verify that GitHub Desktop is using the correct
sshprogram:#5641 (comment)
mattkefford commentedon May 27, 2021
Hi, I tried following your steps but I still have the error message shown in GitHub Desktop "The repository does not seem to exist anymore. You may not have access, or it may have been deleted or renamed."
I can access the repo from the command line, just not through GitHub Desktop which is a bit annoying.
I have generated the new SSH key and added it to my GitHub account but I don't see any step for making GitHub Desktop use the new SSH key?
I am on Ubuntu so I cannot use the alternate ssh program as suggested by steveward