So, I have my pubkeys on github.
Somehow from one of my devices I can't push commits..
> git pull --tags origin main
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.
of course I checked the ssh keys on my github page, thinking that maybe I forgot to put this specific device key in it.
but when I try to add it it tells me the key is already there.
Then I tried to connect through ssh to my github account and of course it works.
Hi mosfetti! You've successfully authenticated, but GitHub does not provide shell access.
What should I do?
Thanks
(Windows 10)
apparently something was rong with origin url..
still don't know why..
solved by adding the origin again
git remote set-url origin https://github.com/myuser/myrepo
Related
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.
I am getting next error:
$ git push -u origin master
remote: Permission to teddyruns/medals.git denied to franciswebdevelopment
fatal: unable to access 'https://github.com/teddyruns/medals.git/': The requested URL returned error: 403
I have checked my global user name and email, and created a new ssh key, but franciswebdevelopment is my old account,
I have no idea why I can't push to my new account,
Does anybody have any idea where I am going wrong?
but franciswebdevelopment is my old account
That means you probably have a git crendential helper which has cached the credentials franciswebdevelopment for github.com.
git config credential.helper
If that is the case, remove that entry:
git credential-manager delete https://github.com
Then try again (but not right now, with HTTPS or SSH, because GitHub is experiencing a major outage)
Github is currently experiencing issues,
Click here to check their status.
I initialized a repo in my GitHub. I issued a git clone command. I went to the directory in my local computer where I wanted to clone the repo. Then I copied some files in my local drive. Then I did:
git add .
git commit
git push -u origin master
The message appeared:
remote: Permission to jasonkid1/testuli.git denied to jpamittan.
fatal: unable to access
'https://jasonkid1#github.com/jasonkid1/testuli.git/': The requested
URL returned error: 403
How can I fix this?
For any https authentication issue, you need to check your credential caching:
git config credential.helper
That is:
On Windows, for instance, you would need to open the Windows Credential Manager and check the right password was entered.
On Mac, you would need to update the OSX keychain.
You might have credentials for any github.com URL associated to jpamittan (wrong user) instead of jasonkid1.
Once I had an old github account, and I'm trying to create a new one and push to that one, but I keep running into permission issues:
remote: Permission to <new account>/<new account>.github.io.git denied to <old username>.
I've tried setting the user name + password, going through different procedures to add ssh keys, deleting my .ssh folder, deleting my old repos, everything I can think of, but I can't fix this.
Check first if your URL is actually an SSH one:
git remote -v
If it is an https,... no amount of SSH setting will allow you to authenticate properly.
If it is an https (again), do check your credential helper with:
git config credential.helper
If you see manager, it is possible the wrong credentials are cached.
In that case, you need to remove them.
See "Github remote permission denied".
The other possibility is the presence of 2FA (2 factor Authentication), which would require a PTA (Personnal Access Token) in place of the regular account password.
But again, you can also switch to an SSH URL:
git remote set-url origin git#github.com:auser/arepo.git
Setting up GitHub, and Im using SSH to connect. Following along hereto get all SSH set up. All is working well until i try to push an existing repository from the command line.
No problems with the following
git remote add origin git#github.com:<username>/first_app.git
But when I execut the following
git push -u origin master
things stop working.
My Keychain access dialog window pops up and wants the id_rsa password. Isn't this the passphrase I made up when i was following the steps on GitHub's how-to setup SSH? I think it is, but Keychain won't take the passphrase (I'm using this interchangeably with the word password).
I get: Permission denied (publickey).
fatal: Could not read from remote repository.
Can someone please help me connect the last piece of this puzzle so I can connect to GitHub via SSH? Thanks