Permission denied (public key). Fatal: Could not read from remote repository - github

Could please someone help me?
I completely blocked using Github. I'm trying to solve the problem, but I can't push my code on Github.
git push --set-upstream origin main Permission denied (public key). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

Related

Git remote seems to point to my repository. But comitting results in Error 403. How do I commit to the repository in my account?

I have a git folder. The remote points to https://myusername#github.com/repo.git. I have cloned this repo from a publicly available repo. When I do git push it asks me for https://myusername#github.com.
I havent used git in a while. I realized they don't do password anymore. So I generated a token and used it in the place of the password. However I am getting the following error
remote: Permission to repo.git denied to myusername.
fatal: unable to access 'https://github.com/repo.git/': The requested URL returned error: 403
However my impression was that I was accessing the repo at myusername#github.com not trying to modify the original public repository "repo.git"
What am I missing? My remote seems to be pointed to my account and it asks the password to my account. Sorry I am inexperienced with git and seem to be missing something fundamental
Thanks

yet again problems with ssh key... but this time on github

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

How can you get the right access key to push in my git work to my github repo?

i encountered this problem while trying to push to my accountvia terminal, working on a site
and it kept giving me that fatal 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 have tried getting access to another SSH key but still not working.
https://docs.github.com/en/authentication/connecting-to-github-with-ssh
This article would help you solve the problem.
Generate an ssh key
Add it to your account
Refresh the project both on github
On your command line and run the git command again.

Cannot push into a repository after its name was changed

The repository I was working on had its name changed (I guess this could be the problem).
I did these steps, the name is updated on my computer but when I tried to push something I got this message:
The authenticity of host 'github.com (140.82.118.3)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6xxxxx.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
after writing yes:
Warning: Permanently added 'github.com,140.82.118.3' (RSA) to the list of known hosts.
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.
trying again to push:
git#github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
The repository was made by me and after that someone else changed its name.
Any suggestions?
Did you update the url?
$ git remote set-url origin new_url

Git Error: Remote repository could not read from

riya#RFL113:~/Documents/EventsAcross_ReactJS$ git push origin master
ERROR: Permission to RiyaKapuria/EventsAcross_ReactJS.git denied to railsfactory-riya.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exist
I'm getting this error while pushing in master. I'm having two git account in same system with two SSH Key.
I'm following https://code.tutsplus.com/tutorials/quick-tip-how-to-work-with-github-and-multiple-accounts--net-22574
Can anyone help please?