Could not read from remote repository

2019-02-04 04:40发布

I have received the following error multiple times:

Could not read remote repository. Please make sure you have the correct access rights and the repository exists.

I am very confused about how to remedy this error.

标签: github aptana
15条回答
Evening l夕情丶
2楼-- · 2019-02-04 05:06

Installing a root/CA Certificate

Given a CA certificate file foo.crt, follow these steps to install it on Ubuntu:

Create a directory for extra CA certificates in /usr/share/ca-certificates:

sudo mkdir /usr/share/ca-certificates/extra

Copy the CA .crt file to this directory:

sudo cp foo.crt /usr/share/ca-certificates/extra/foo.crt

Let Ubuntu add the .crt file's path relative to /usr/share/ca-certificates to /etc/ca-certificates.conf:

sudo dpkg-reconfigure ca-certificates

This is an old post, but this is they only thing that I found that worked.

查看更多
Summer. ? 凉城
3楼-- · 2019-02-04 05:06

I also had the exact same error and for some reason restarting my pc solved the error. Maybe it works for somone else too :P

查看更多
▲ chillily
4楼-- · 2019-02-04 05:07

I had same issue on my private Ubuntu server using ssh.

My workaround solution was:

open shell on my private server

git init --bare /path/<myapp>.git

and then, from my developer laptop

git push <remote_repo> <local branch>

has finally worked well.

PS:

I've never tried, but remote repo with https seems working better than ssh.

I hope this help.

查看更多
霸刀☆藐视天下
5楼-- · 2019-02-04 05:10

Assuming you have done the proper SSH keys configuration according to github's instructions it might be a problem of pull with https and later pushing with git+ssh

to make it more clear

if you have used https to pull

git pull https://github.com/user/repo.git

then you have changed remote URL

git remote set-url origin git+ssh://github.com/user/repo.git

and tried to push after some changes and commits

git push origin master

you might get this error it happened to me

erase the local repository and re-clone using git+ssh

git pull git+ssh://github.com/user/repo.git

and now your push should work

查看更多
等我变得足够好
6楼-- · 2019-02-04 05:11

I had the same issue with Pycharm on Ubuntu the solution is to use https instead of SSH for example : https://github.com/Bedo1212/myrepo.git

查看更多
Rolldiameter
7楼-- · 2019-02-04 05:12

I had the exact same issue with a private repo. Cloning through the same error both through https and ssh

Then I made a commit through github (simply updated the README.md with an empty line)

Surprisingly enough, this resolved the issue. It would be nice to know why though!

查看更多
登录 后发表回答