question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I can't connect to my own repository. Push origin

See original GitHub issue

Hello, I have the same problem as https://github.com/desktop/desktop/issues/2453 I can’t connect to my own repository I think the problem is because of shh keys.

When I first time installed git in 2016 I just launched github.desktop once. Was created key github_rsa. In 2017 I started work with git console and created a new key id_rsa and added it to the github account. it still working for now 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 because of different ssh keys. How to “meet” working key with github desktop?

GitHub Desktop version: [1.0.13]

OS version: [Microsoft Windows 7 version 6.1.7601]

Steps to Reproduce

I have local repository (with .git folder)

  1. [push origin]
  2. [Error : “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.”]

Reproduces how often: [100%]

Logs

Developer’s tools console log: "Executing fetch: git -c credential.helper= fetch --progress --prune origin " and below: install.ts:23 git -c credential.helper= fetch --progress --prune origin exited with an unexpected code: 128. 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. 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.)

%APPDATA%\GitHub Desktop\logs\*.desktop.production.log I have not this log/ folder

Additional Information

git remote -v origin git@github.com:EugeneAndrievsky/repositoryName.git (fetch) origin git@github.com:EugeneAndrievsky/repositoryName.git (push)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

12reactions
RedaBenhcommented, Mar 4, 2019

I get the same error. i change the git remote url from ssh to https :

  1. Go to menu > Repository Settings
  2. Change primary remote repository (Origin) from “git@github.com:<user_name>/<repo_name>.git” to “https://github.com/<user_name>/<repo_name>.git”
9reactions
EugeneAndrievskycommented, Feb 16, 2018

@iAmWillShepherd

  1. Using Github Desktop:
  1. Using Github Desktop:
  • Add a local repository… (ctrl + o) (cloned earlier by console using SSH)
  • Make a commit
  • Push origin
  • Error: “Authentication failed. You may not have permission to access the repository…”
  1. Using console:

So, the problem was caused by using SSH. Thank you very much for your help and for such a quick response.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git Push ERROR: Repository not found - Stack Overflow
Same issue. I get remote: Repository not found. when accessing to private repo. It was because still connected to repo with old credentials...
Read more >
Can t connect to any repository While pushing to github
Go to Window -> Preferences -> Team -> Git -> Configuration, click 'Repository Settings' tab and paste your GIT ssh URI to remote.origin.url ......
Read more >
Error: failed to push some refs to – How to Fix in Git
We can fix the error: failed to push some refs to [remote repo] error in Git using the git pull origin [branch] or...
Read more >
Can't push to your GitHub repo? I can help with that.
Have you been working on a project for a while and recently realize you can no longer push your changes to your git...
Read more >
Getting started with Git and AWS CodeCommit
Run git push to push your commit through the default remote name Git uses for your CodeCommit repository ( origin ), from the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found