I am getting this error -
D:\Projects\wamp\www\REPO [master]> git pull origin master
Warning: Permanently added 'github.com,192.30.252.128' (RSA) vĩ đại the list of known hosts.
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 output of git remote -v
D:\Projects\wamp\www\REPO [master]> git remote -v
origin [email protected]:username/repo.git (fetch)
origin [email protected]:username/repo.git (push)
Final message of ssh -Tv [email protected] command -
Hi [My Username]! You've successfully authenticated, but GitHub does not provide shell access.
How can I solve it?
asked May 6, năm ngoái at 5:33
NisargNisarg
3,2225 gold badges33 silver badges55 bronze badges
13
change your ssh url by an http url for your remote 'origin', use:
> git remote set-url origin https://github.com//.git
It will ask for your GitHub password on the git push.
answered Oct 14, năm nhâm thìn at 17:41
Siyaram MalavSiyaram Malav
4,6582 gold badges35 silver badges33 bronze badges
10
For má, I was getting this error because my ssh agent was not running somehow. Doing this worked:
eval `ssh-agent -s`
ssh-add path_to_your_key
answered Nov 16, 2021 at 15:56
Shashank KsShashank Ks
6806 silver badges11 bronze badges
2
I asked in the discussion:
does
ssh -T [email protected]
ouput the same username (in Hi [My Username]!
) as in the one used for the ssh url of your repo ([email protected]:username/repo.git
)?Sorry It not showing same name
That means somehow the credentials have changed.
One solution would be vĩ đại at least copy %HOME%\.ssh\id_rsa.pub
in the SSH keys section of the right GitHub account
The OP adds:
I am working on private repo. So In [email protected]:username/repo.git,
I replied:
If you were able vĩ đại clone/push vĩ đại that repo whose username is not your own GitHub tài khoản, that must be because you had your previous public ssh key added as a contributor vĩ đại that repo by the repo's owner.
What next is vĩ đại ask that same repo owner vĩ đại add your current public ssh key
%HOME%\.ssh\id_rsa.pub
vĩ đại the repo contributor list.
So kiểm tra with the owner that you (meaning your public ssh key) are declared as a contributor.
answered May 6, năm ngoái at 6:37
VonCVonC
1.3m558 gold badges4.7k silver badges5.6k bronze badges
This error happened vĩ đại má too as the original repository creator had left the company, which meant their tài khoản was deleted from the github team.
git remote set-url origin https://github.com/
And then
git pull origin develop
or whatever git command you wanted vĩ đại execute should prompt you for a login and continue as normal.
answered Apr 21, 2017 at 12:37
Muhan AlimMuhan Alim
4891 gold badge7 silver badges17 bronze badges
1
Sometimes this happens vĩ đại má because of network problems. I don't understand the problem fully, but switching vĩ đại a different sub-network or using VPN solves it
answered Jun 22, năm ngoái at 15:06
kip2kip2
6,8135 gold badges60 silver badges75 bronze badges
6
This error can be because of no SSH key on the your local machine. Check the SSH key locally:
$ mèo ~/.ssh/id_rsa.pub
If above command bởi not give any output use below command vĩ đại create ssh key(Linux/Mac):
$ ssh-keygen
Now again lập cập cat ~/.ssh/id_rsa.pub This is your SSH key. Copy and add this key vĩ đại your SSH keys in on git. In gitlab/bitbucket go to
profile settings -> SSH Keys -> add Key
and add the key
answered Nov 13, 2017 at 4:09
BSBBSB
2,45818 silver badges28 bronze badges
ssh-add -D # Delete all identities.
ssh-add ~/.ssh/your_key
Edit 1
Since I get sánh many votes, I discovered some issue with this approach and that is that it will remove all your identities sánh you might have the same issue when you try vĩ đại read from other repositories and you will need vĩ đại to this step again for each project...but it might also not be the case for your project
answered Jul 16, 2020 at 10:56
TudorTudor
1,5781 gold badge19 silver badges17 bronze badges
Try:
git config --global credential.helper cache
This command prevents git vĩ đại ask username and password, not forever but with a mặc định limit vĩ đại 15 minutes.
git config --global credential.helper 'cache --timeout=3600'
This moves the mặc định limit vĩ đại 1 hour.
answered Apr 10, 2020 at 12:29
For má none of the solutions here solved it. Frustrated, I restarted my Macbook's iTerm terminal, and voila! My github authorization started working again.
Weird, but maybe iTerm has its own way of handling SSH authorizations or that my terminal session wasn't authorized somehow.
answered Sep 29, 2020 at 9:58
Jonathan PerryJonathan Perry
3,0433 gold badges46 silver badges54 bronze badges
Easy solution for me:
The public SSH Key has vĩ đại be saved on https://github.com/settings/keys
The gmail address inside "~/.ssh/id_rsa.pub" (At the kết thúc of the file) has vĩ đại be entered on Github (https://github.com/settings/emails). (This was my problem)
After I saved the gmail address on GitHub, the problem solved itself.
answered Oct 10, 2022 at 21:49
emovereemovere
1621 silver badge14 bronze badges
I got the very same errors too. In My case upgrading from Windows 7 vĩ đại 8 messed up my settings. What helped was vĩ đại regenerate the private and public SSH keys using PuTTYGen, and change the SSH tool in tortoisegit from SSH vĩ đại Plink.
I have shared the step by step steps also at http://techblog.saurabhkumar.com/2015/09/using-tortoisegit-on-windows-with.html
answered Sep 11, năm ngoái at 2:59
Saurabh KumarSaurabh Kumar
2,3576 gold badges32 silver badges52 bronze badges
Maybe, as in my silly situation, you may somehow created the ssh key by directly typing
ssh-keygen
And sánh it is created with the local system user credentials sánh they don't match, use full command lượt thích this and recreate
ssh-keygen -t rsa -b 4096 -C "[email protected]"
answered Mar 10, 2020 at 0:47
I needed vĩ đại have rw for user only permissions on config. This fixed it.
chmod 600 ~/.ssh/config
answered Sep 8, 2023 at 7:41
1
I had this issue and tried many things but still din't work. Eventually I decided vĩ đại generate another SSH KEY
and boom - it worked. Follow this article by github vĩ đại guide you on how vĩ đại generate your SSH KEY.
Lastly don't forget vĩ đại add it vĩ đại your github settings. Click here for a guide on how vĩ đại add your SSH KEY
vĩ đại your github tài khoản.
answered Jun trăng tròn, 2017 at 13:00
otoloyeotoloye
6977 silver badges11 bronze badges
In my case updating GIT helps - I had version 2.23 and with installing version 2.26.2.windows.1 problem disapears.
So if you are sure your SSH key is valid then (see @VonC answer):
- update GIT
- update composer
- run composer clearcache
And it should be ok.
answered Apr 26, 2020 at 13:30
Manic DepressionManic Depression
1,0304 gold badges18 silver badges36 bronze badges
This issue could be related with missing SSH key at Github or any other git server.
In my case I had copied code vĩ đại another computer and tried vĩ đại git pull
. It failed.
So I had vĩ đại generate a new SSH key on that machine and update profile on git server with additional SSH key.
answered Jun 18, 2020 at 19:07
laimisonlaimison
1,6883 gold badges20 silver badges44 bronze badges
Strangely I had this occur with a single repository out of > trăng tròn repositories on my Apple MacBook phiên bản Pro.
The solution was vĩ đại upgrade git via homebrew, and everything strangely worked after it finished:
brew install git
Hope this helps someone!
answered Jul 8, 2020 at 1:42
Steve BaumanSteve Bauman
8,6488 gold badges42 silver badges56 bronze badges
Its not necessary vĩ đại apply above solutions, I simply changed my mạng internet, it was working fine with my trang chủ mạng internet but after 3 vĩ đại 4 hours my friend suggest má vĩ đại connect with different mạng internet then I did data package and connect my máy vi tính with it, now it is working fine.
answered Dec 2, 2020 at 14:18
NafeesNafees
1,0341 gold badge13 silver badges19 bronze badges
I had the same problem. I tried a couple of solutions mentioned above, it did not work for má. I even restarted my machine and also reconnected my WLAN. But all in vain. Then on the remote repo, I manually made a small change in the readme tệp tin of the repo. To pull that change on the local copy of my repo in my machine, I did the usual git pull
and then the git push origin
. This actually worked.
answered Oct 19, 2021 at 20:21
BZKNBZKN
1,6692 gold badges11 silver badges26 bronze badges
For má somehow sudo reboot
ing the fluffing EC2 instance after a fresh ssh-keygen
and rm ~/.ssh/known_hosts
fixed it! Still not sure how it works but it worked on 4 different EC2 servers with uptime over 700 days. I think it is related vĩ đại some breaking updates on some processes during the 700 days!! Still not sure what fixed it but for damn its fixed!
answered Dec 5, 2022 at 18:10
Nidhin DavidNidhin David
2,4743 gold badges32 silver badges45 bronze badges
I faced the same issue because I have a lot of Git accounts, you can resolve this issue by instructions below:
For macOS
eval `ssh-agent -s`
ssh-add --apple-use-keychain ~/.ssh/your_key.pub
For Linux
eval `ssh-agent -s`
ssh-add ~/.ssh/your_key.pub
answered Nov 29, 2023 at 7:42
Tan NguyenTan Nguyen
1,0919 silver badges8 bronze badges
I was getting this error when I tried vĩ đại clone from my organization repository (my server ssh key was added vĩ đại my github tài khoản and I could clone from my personal repos, but could not clone from organization).
I mix up the server with Laravel Forge. During mix up, Laravel Forge creates Laravel Forge Application in Applications on GitHub (in the Authorized OAuth Apps tab). But this ứng dụng does not get access vĩ đại your organizations by mặc định.
The solution vĩ đại this error was vĩ đại grant access for Laravel Forge Application vĩ đại my organization in GitHub using GitHub interface. Open you applications here https://github.com/settings/installations, the go vĩ đại "Authorized OAuth Apps" tab, then choose "Laravel Forge" ứng dụng, then press the "Grant" button for the needed organization (see pictures).
This was not obvios vĩ đại má at first, because I thought that the Forge ứng dụng has access vĩ đại all repos by mặc định, including organization repos.
Applications
Laravel Forge Authorized OAuth App Grant buttons
When I created new projects on GitHub.com, the mặc định option for connecting vĩ đại the repository was SSH Key.
I was copying the links that starts with [email protected]:
and tried vĩ đại clone the repo with this links.
I had vĩ đại change vĩ đại the HTTPS tab and copy the url that starts with https://github.com/
vĩ đại use the git clone
command.
Hernando NHernando N
3053 silver badges8 bronze badges
If one creates a new local git repository and then attempts vĩ đại push it vĩ đại GitHub, GitHub will not create a new repository automatically. One has vĩ đại create a new repository on GitHub manually before one could push into it. That is another reason one could get the error:
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
S.VS.V
2,7152 gold badges26 silver badges49 bronze badges