github
github copied to clipboard
getting access denied in atom but git works fine in terminal
Description
So I am using ATOM against a private `BitBucket git repo and have been for weeks without issue. I left on vacation for a week and since I got back I cannot access the repo through atom at all and am getting a Permission Denied Denied message.
Here are the details:
- I am using SSH.
- OS is Mac High Sierra
- From terminal, all the git commands work fine (status, fetch, add, push, pull)
- I have added the keys to the ssh-agent
- I have set the .ssh config file to use the mac keychain
- I have added the public key to my account in the repo
- I am using Atom v 1.29.0
- I am using github package v 0.17.3
- I have deleted, re-generated and reapplied the SSH keys multiple times (no cigar)
- I have removed and recloned the repo (no cigar)
- here is the output from git remote -v (edited of course to anonymise) git remote -v origin ssh://[email protected]:7999/repoblah/repoblah.git (fetch) origin ssh://[email protected]:7999/repoblah/repoblah.git (push)
- Every attempt to use the github package in atom results in an access denied message
- Everything was working fine before my vacation.
Steps to Reproduce
- test git by using a command from the terminal (for example git pull) - WORKS FINE
- test git in atom by using the git pull command in the github package - Permission denied error
Expected behavior:
I expect for the git commands in Atom to work
Actual behavior:
I am getting a permission denied message (see attached image)
Reproduces how often: 100%
Versions
atom --version Atom : 1.29.0 Electron: 2.0.5 Chrome : 61.0.3163.100 Node : 8.9.3 apm --version apm 1.19.0 npm 3.10.10 node 6.9.5 x64 atom 1.29.0 python 2.7.10 git 2.15.2
Additional Information
This is for a private bitbucket repo
Thanks for the report! Just to clarify, I'm assuming that in your step 10, you're cloning from the command line and you can't clone with the GitHub package either?
Also, do you have any problem with any private or public repository or just that one?
You mentioned:
I left on vacation for a week and since I got back I cannot access the repo through atom at all and am getting a Permission Denied Denied message.
Do you recall if you updated to 1.29 after coming back from vacation? Curious if you install 1.28 if you still get this error?
Lastly, I believe there were a number of changes to the GitHub package in the 1.30 beta - I don't know if anything is specifically related to the issue you're seeing here but can you also confirm if you see the issue in the beta?
Thanks for the reply,
Yes I cloned from the cli. I had not tried using a different repo, so I added the same public key to github and cloned the flight-manual.atom.io repo from the cli. On that repo I did a git status from the cli, verifying my public key configuration. I added the project to atom and,,,, BANG - same error Permission denied (publickey). So the issue is not my repo. hmm.
I removed atom 1.29 and reinstalled atom 1.28. That did not fix the issue. Neither did installing 1.30 beta.
This is really weird.
S
Same issue here. Did you solve it?
Same here. My repo is a private github repo if that helps.
Any update on this? Having the same issue on Fedora 29
@egenomics @basandlin @crimv42 - are you all using SSH and seeing the exact same error?
No particular updates since the error's not generally reproducible so far.
@rsese My error has more than @scottsp64 posted:
Unable to fetch
linux-ssh: Linux ssh wrapper invoked with arguments: [[email protected]
linux-ssh: using SSH command [ssh]
[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.
is my full error. I use my GPG key for my SSH key with the gpg-agent replacing the ssh-agent, not sure about the others.
I can use my GPG signing key to sign commits no problem in Atom, but when trying to fetch or push, I get the error above.
The same problem. Ubuntu 18.04, git 2.17.1, Atom 1.20.2. I use SSH keys and I have a private repo on GitHub. When I use the terminal, everything works fine.
linux-ssh: Linux ssh wrapper invoked with arguments: [[email protected]
linux-ssh: using SSH command [ssh]
/run/user/1000/snap.snappyatom/github-119123-12969-zo6v4m.moytdtpgb9/linux-ssh-wrapper.sh: 26: /run/user/1000/snap.snappyatom/github-119123-12969-zo6v4m.moytdtpgb9/linux-ssh-wrapper.sh: setsid: Permission denied
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
OK I have found an update to this issue. It has to be something with my environment variables. When I start Atom from terminal, I can push, pull, merge, everything. When I start from the GUI, I get the error that permission is denied. This has to be with me changing the default SSH socket in my ~/.bashrc:
# Default SSH Socket to GPG
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
export SSH_AUTH_SOCK
We need to be able to update the SSH socket in Atom easily.
Edit: I found a temporary fix by adding the following to /etc/profile
# Default SSH Socket to GPG
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
export SSH_AUTH_SOCK
Ohh it sounds like you're running into this issue @crimv42?
https://github.com/atom/atom/issues/18318
@Agata-R - it looks like you're using a Snap installation of Atom? The Snap installation is unofficial and not supported by us and it also looks like the version you're running is not up to date (the current stable release version is 1.34.0). Not sure if that's related to the problem you're having but I would recommend using an official installation of Atom: https://flight-manual.atom.io/getting-started/sections/installing-atom/.
Ohh it sounds like you're running into this issue @crimv42?
It would appear so! It just came under the guise of an SSH issue. I think the propsed fix here should be merged in a future release.
@Agata-R - it looks like you're using a Snap installation of Atom? The Snap installation is unofficial and not supported by us and it also looks like the version you're running is not up to date (the current stable release version is 1.34.0). Not sure if that's related to the problem you're having but I would recommend using an official installation of Atom: https://flight-manual.atom.io/getting-started/sections/installing-atom/.
Yay! That was it, now everything works fine. Thank you for help.
I have this issue too. I am using verison 1.53.0.
Same here. Which workaround for ssh-agent?
For a private repo at org, I have:
Unable to fetch
linux-ssh: Linux ssh wrapper invoked with arguments: [-o
linux-ssh: using SSH command [ssh]
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
The script I use to launch Atom is:
export ATOM_DEV_RESOURCE_PATH=/home/user/git/atom
eval `ssh-agent`
ssh-add /home/user/.ssh/privkey
echo starting Atom
nohup atom &
echo exiting with exitcode 0
exit 0
I have the same problem on Ubuntu 20.04.4. it works in the console with the git command but not inside atom. I tested it also on Windows 10 and there it works.
Error message:
linux-ssh: Linux ssh wrapper invoked with arguments: [-o
linux-ssh: using SSH command [ssh]
Connection closed by <my-ip> port <my-port>
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.