Неустранимый: '~ peterI / public_html / public.git', по-видимому, не является git-репозиторием. Неустранимый: Не удалось прочитать из удаленного репозитория. - PullRequest
0 голосов
/ 31 мая 2018

У меня есть два общедоступных репозитория: origin и peterI:

C:\Users\[path]\app>git remote -v
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (fetch)
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (push)
peterI  ssh://manuelM@example.net/~peterI/public_html/public.git (fetch)
peterI  ssh://manuelM@example.net/~peterI/public_html/public.git (push)

Когда я пытаюсь получить последний код из общедоступного репозитория peterI, я получаю эту ошибку:

C:\Users\[path]\app>git fetch 
manuelM@example.net's password: [My password] 
fatal: '~peterI/public_html/public.git' does not appear to be a git repository 
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

Хранилище определенно существует: ssh://manuelM@example.net/~peterI/public_html/public.git.Какие права доступа мне нужно настроить?Может быть, что-то о разрешениях?Спасибо.

ОБНОВЛЕНИЕ 1. Я попробовал то, что Тревор Трейси предложил в своем ответе, но безуспешно:

C:\Users\[path]\app>git remote -v
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (fetch)
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (push)
peterI  ssh://manuelM@example.net/~peterI/public_html/public.git (fetch)
peterI  ssh://manuelM@example.net/~peterI/public_html/public.git (push)

C:\Users\[path]\app>git remote remove peterI

C:\Users\[path]\app>git remote -v
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (fetch)
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (push)

C:\Users\[path]\app>git remote add peterI ssh://manuelM@example.net/~peterI/public_html/public.git

C:\Users\[path]\app>git remote -v
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (fetch)
origin  ssh://manuelM@example.net/~manuelM/public_html/public.git (push)
peterI  ssh://manuelM@example.net/~peterI/public_html/public.git (fetch)
peterI  ssh://manuelM@example.net/~peterI/public_html/public.git (push)

C:\Users\[path]\app>git fetch peterI
manuelM@example.net's password: [My password]
fatal: '~peterI/public_html/public.git' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


C:\Users\[path]\app>

ОБНОВЛЕНИЕ 2. Я пошел посмотреть файл .git \ config и вот чтоЯ вижу в конце этого файла:

[remote "peterI"]
url = ssh://manuelM@example.net/~peterI/public_html/public.git
fetch = +refs/heads/*:refs/remotes/peterI/*

Публичный репозиторий ssh: //manuelM@example.net/~peterI/public_html/public.git, кажется, там.Что я мог делать неправильно?Может быть, мне нужны определенные разрешения для ssh: //manuelM@example.net/~peterI/public_html/public.git?

ОБНОВЛЕНИЕ 3: я начинаю подозревать, что это проблема с разрешениями для файлов и папок вLinux.

Ответы [ 2 ]

0 голосов
/ 02 июня 2018

Это была проблема с разрешениями.Мне пришлось создать группу и добавить в нее пользователей.Затем измените владельца группы папок Git на эту группу, которую я создал, и проблема была устранена.

Я перенес с одного сервера на другой, и по какой-то причине группа не была такой же дляGit папки во время процесса миграции.Теперь все работает правильно, проблема была с разрешениями.

0 голосов
/ 31 мая 2018

Попробуйте git fetch peterI

Вы также можете удалить старый пульт:

$git remote remove peterI

И добавить отсутствующий пульт:

$git remote add peterI ssh://manuelM@example.net/~peterI/public_html/public.git

$git fetch peterI master
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...