zsh: permission denied: /Users/ryanshumway/.ssh - github

New to programming, and my employer had setup my SSH with Gitlab for me.
Now that I'm learning more programming I thought, hey, I'll setup another SSH for my personal projects in Github.. and then I think it replaced my gitlab SSH, and now I'm not sure how to replace my GitHub ssh and my personal one, and I'm not able to get into the configure file and see anything.
I'm at the point where I can't modify either of them and I can't do anything (personal and work).
How do I get around this permission denied? It seems like there's no way to edit my config file or even see which keys are active

Check:
your current account: id -a
the rights associated with the ssh folder:
ls -alrth /User/ryanshumway
Make sure you are not using your terminal as root or any other account than ryanshumway

Related

GitHub ssh keys - ssh test works but using git clone returns permission denied

I've been working on this for a few hours now and I've read everywhere but am officially stumped.
I'm trying to set up ssh keys for a dev-environment to interact with github. I've followed the guide on github and have made the keys and when I test them using the git#github.com it works but when I use git clone git#github.com:username/repo I get
Cloning into 'reponame'...
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.
I've tried adding it to ssh-add and that works, ssh-agent is running and has access. I've looked at the environment variable and set it to ssh among a few other things. I don't know what else to try. Let me know what logs I can post to help.
My thoughts are maybe the git command isn't using the identities or the right ssh client but other than the environment variables I'm not sure what else to change.
Thanks for the help in advance.

Github SSH issue 'Permission Denied'

I am stuck on this annoying (and common) issue running Manjaro (latest). SSH works just fine for me on my local network. I can connect to my file server and pi-hole just fine.
GitHub however is proving more difficult.
gh repo clone User/Reponame gives the following:
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
Cloning into 'Reponame'...
warning: templates not found /usr/share/git-core/templates
The authenticity of host 'github.com (140.82.121.3)' can't be established.
RSA key fingerprint is SHA256:SomeLongNumberBlahBlah.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/USER/.ssh/known_hosts).
Load key "/home/USER/.ssh/id_rsa": Permission denied
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.
exit status 128
Now I tried deleting my known_hosts, checking the file permission, creating new keys for my server/pi-hole and all works fine. I don't see why GH is struggling with permission. I've tried a few solutions but nothing seems to work for me. I've set my global user and email for github, I just can't get passed this step.
ssh -T git#github.com Asked for a passphrase and accepted it when I entered. Yay! I have both keys set and added to github.com via my browser etc. I must be missing something.
Still no change in the clone command. I am honestly stuck having read multiple threads on the subject. SSH always gets me :(

How to clone github private repository in cpanel (shared host without terminal or ssh)?

I have a shared host and they don't give me ssh or terminal for it.
I've tried to clone my private repos from git by Gitâ„¢ Version Control so I am using ssh link because they need permission. I don't know how to make ssh key on cpanel so I can make it from my mac and upload to cpanel and also add to Github.
But when running, they give me error: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists..
I'm a beginner for using Git & StackOverflow, so please let me know if there's anything wrong with the question I've asked. Thanks!
Tried Url with password
Cloning a private Github repo and
having a response "The clone URL cannot include a password."
This is different than what worked for the OP (hopefully they put their solution in an answer here).
I was able to solve this problem by installing an external SSH client (like PuTTY for Windows) and then SSH into my website using its IP address. Then I followed these steps from cPanel to connect the private repository.

Cannot use git to clone in remote web server

I have created a Github repo to where I push my local changes using Git Bash, without any problems. I can also use Git Bash to connect to my remote web server (shared hosting) and navigate to the folder where I want to clone my Laravel site.
This is where the problems begin. When I do
$ git clone git#github.com:myusername/mylaravelsite.git
I get the error message:
Permission denied (publickey)
After some searching for a solution I found that I should make sure that I have a key by doing this:
$ eval "$(ssh-agent -s)"
Which gave this answer:
Agent pid 122372
Then according to the instructions I should do this
$ ssh-add -l
Which gave me this message:
The agent has no identities
Reading up a bit more I try to add the key again by doing
$ssh-keygen -t rsa
...which generated a key pair that I added with ssh-add, I was prompted for a passphrase which I entered twice.
Now, I still get Permission denied (publickey) when I try to access my github repo with ssh. I should also mention that I have created a new SSH key at the github account where I pasted the key I created (I opened .ssh/id_rsa-pub with notepad and copied the content).
What more can I try?
Finally found the answer in case anyone else has the same problem. It turns out that the public key also must exist in the remote web server (in the .ssh folder I uploaded the same rsa_id and rsa_id.pub files, that I created locally), not only locally and in the Github account.
Once I had figured that out and uploaded those files to the webserver, it worked to clone my github repo :-).

Github Permission Denied

Banging my head on this github multiple user thing and hoping I can get some help!
I just added a new email to my existing github account, changed my git configs locally to the right name and email, and added the ssh key to github but when I try to push my new project I created it says permission denied. I have the right repo set up for my origin too.
What's confusing me is when I do ssh -T git#github.com it says you've successfully authenticated with my other user...
I know I'm missing something so if you see it please let me know!
Thanks
A full ssh url will work:
ssh://git#github.com/User/repo.git
But here, you might be using an scp-like syntax, like the question you mention:
github.com:User/repo.git
You risk using an entry "github.com" entry in a $HOME/.ssh/config file, which can then specify explicitly a different private key, as shown here.
Host github.com
Hostname github.com
User git
IdentityFile ~/.ssh/myprivatekey