Cannot push into a repository after its name was changed - github

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

Related

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

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.

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

Deleted my SSH keys and can't push commits

Accidentally removed my ssh keys from github. I then created a new SSH and linked it to github and even checked if it worked by using
maxmandia#Maxs-Air ~ % ssh -T git#github.com
Even with this, I still can't push changes and get the following error:
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.
%

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?

Github Public key permission denied

Gitbush is work fine but after my windows reinstall this is not any operation with github . When i pull or push something it make an error :
Permission denied (publickey). fatal: The remote end hung up unexpectedly
How can i solve this ??
It depends on the url used:
cd c:\path\to\your\repo
git remote -v
If it is ssh, you would need to regenerate an ssh public/privbate key, and register it to your GitHub repo.