Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

[QUESTION] Fatal: could not read from remote repository, SSH issue? #575

Open
jmcweeney opened this issue Dec 23, 2016 · 12 comments
Open

[QUESTION] Fatal: could not read from remote repository, SSH issue? #575

jmcweeney opened this issue Dec 23, 2016 · 12 comments

Comments

@jmcweeney
Copy link

jmcweeney commented Dec 23, 2016

Atom plus git-plus has made life so much easier. Yet, after the recent macOS Software Update (10.12.2) git-plus is having trouble reaching my remote OpenShift git repository.

Steps to reproduce:

git push results in:

Permission denied (publickey,gssapi-keyex,gssapi-with-mic). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

Wonder if this is an SSH issue, but I'm able to successfully push (to this repository) from the terminal and another app. Any insights you have would be greatly appreciated! Thanks!

@jmcweeney jmcweeney changed the title [ISSUE] Could not read from remote repository [QUESTION] Could not read from remote repository Dec 23, 2016
@jmcweeney jmcweeney changed the title [QUESTION] Could not read from remote repository Fatal: could not read from remote repository Dec 23, 2016
@jmcweeney jmcweeney changed the title Fatal: could not read from remote repository [QUESTION] Fatal: could not read from remote repository, SSH issue? Dec 23, 2016
@muhyiddins
Copy link

I have same problem

@jmcweeney
Copy link
Author

I'm at a loss. I've uninstalled the git-plus package, reinstalled Atom, even dumped the .atom/ folder, but nothing has helped so far.

@akonwi
Copy link
Owner

akonwi commented Dec 24, 2016

Do you have ssh setup so it doesn't require you to enter your credentials? That's the first thing to check because currently the package favors an ssh setup like that because you can't enter input to the git commands.

I plan to update to MacOs Sierra in the next couple of days and maybe I'll have the same experience

@jmcweeney
Copy link
Author

jmcweeney commented Dec 24, 2016

Yes, all OpenShift is handled with ssh, no credentials required. For example, if I use Terminal to git push it requires my credentials.

Right on, let me know how it goes. Thanks for responding! Cheers and happy holidays!

@akonwi
Copy link
Owner

akonwi commented Dec 25, 2016

I'm unfamiliar with OpenShift and I don't think I fully understand what your setup is. What stands out to me in your response though is that pushing from the terminal requires you to enter your credentials, which would also be true with this package as well. The package is spawning a shell process to execute git commands so the behavior will be the same as in the terminal. So if you do need to enter your credentials from the terminal, that is probably the source of the problem.

@icflorescu
Copy link

I think this annoyance may be related by recent macOS 10.12 Sierra changes to ssh. See this stackoverflow thread for more info.

TL;DR workaround:

Basically, ssh-add -K needs to be run after every reboot. To avoid this, create ~/.ssh/config with the following content:

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa

@akonwi
Copy link
Owner

akonwi commented Dec 27, 2016

Thanks @icflorescu!

I just upgraded to Sierra and had the same problem. ssh-add -K seems to be the current solution.

@icflorescu
Copy link

You're welcomed, @akonwi, and thanks for doing an extraordinary job with git-plus! One of the most useful atom plugins out there, definitely.

Be advised that ssh-add -K only solves the problem until the next boot, while adding the .ssh/config solves it permanently.

@jmcweeney
Copy link
Author

Thanks @icflorescu this worked like a charm. Will need to give ~/.ssh/config a try.

@alistairjackman
Copy link

Have to thank @icflorescu after going round in circles for ages trying to solve this!

@PJOssenbruggen
Copy link

I am new to Atom and fear that I not installed everything I need. Atom will neither push or pull. I am running MacOS 10.13.4. I installed apm install and restarted atom. I logged into Atom and evrything looks good.

<PJO:~ PJO$ ~/.ssh/config
-bash: /Users/PJO/.ssh/config: No such file or directory>

<PJO:PJOssenbruggen.github.io PJO$ ssh-add -K
Enter passphrase for /Users/PJO/.ssh/id_rsa: > I don't know where to get the id.

I pushed changes from my Mac to GitHub with Atom. The wheel spins and gives no indication that it is not working.

Any help would be appreciated.

@CaptXiong
Copy link

I ' ve came into this problem for ages.
Nothing had happend after trying this things...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants