У меня есть git хранилище A, которое содержит подмодуль B. Когда я выполняю git submodule update --init --recursive
в хранилище A для обновления подмодуля, я получаю ошибку Permission denied (publickey)
. Клавиша s sh правильно добавлена в пульт (gitlab), и я могу клонировать оба репозитория независимо через s sh. Клонирование B вне A работает. Репозиторий B находится в той же группе, что и репозиторий A (на gitlab).
Я попробовал следующее:
- Установка абсолютной ссылки в
.gitmodules
- Изменение ссылки в
.gitmodules
на http - Создание чистого клона A
- Добавление ключа fre sh s sh (с парольной фразой и без нее)
- Клонирование репозитория A с параметром
--recursive
Как решить проблему?
* .gitmodules
содержит следующее содержимое:
[submodule "B"]
path = path_to_B
url= ../B.git
Полный сообщение об ошибке:
Cloning into '{path_to_B}'...
git@gitlab.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '{git@.../B.git}' into submodule path '{path_to_B}' failed
Failed to clone '{path_to_B}'. Retry scheduled
Cloning into '{path_to_B}'...
git@gitlab.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '{git@.../B.git}' into submodule path '{path_to_B}' failed
Failed to clone '{path_to_B}' a second time, aborting