Ошибки клонирования HTTPS
При использовании HTTPS с GIT распространен ряд ошибок. Обычно они указывают на то, что у вас старая версия GIT или нет доступа к репозиторию.
Ниже приведен пример возможной ошибки HTTPS:
> error: The requested URL returned error: 401 while accessing
> https://github.com/USER/REPO.git/info/refs?service=git-receive-pack
> fatal: HTTP request failed
> Error: The requested URL returned error: 403 while accessing
> https://github.com/USER/REPO.git/info/refs
> fatal: HTTP request failed
> Error: https://github.com/USER/REPO.git/info/refs not found: did you run git
> update-server-info on the server?
Проверка версии GIT
Ограничений на минимальную версию GIT, требуемую для взаимодействия с GitHub, нет, но, по нашему опыту, версия 1.7.10 является удобной, стабильной версией, доступной на многих платформах. Последнюю версию всегда можно скачать на веб-сайте GIT.
Проверка правильности удаленного репозитория
Репозиторий, который вы пытаетесь получить, должен существовать в GitHub.com, а в URL-адресе учитывается регистр.
Чтобы узнать URL-адрес локального репозитория, можно открыть командную строку и ввести git remote -v:
$ git remote -v
# View existing remotes
> origin https://github.com/ghost/reactivecocoa.git (fetch)
> origin https://github.com/ghost/reactivecocoa.git (push)
$ git remote set-url origin https://github.com/ghost/ReactiveCocoa.git
# Change the 'origin' remote's URL
$ git remote -v
# Verify new remote URL
> origin https://github.com/ghost/ReactiveCocoa.git (fetch)
> origin https://github.com/ghost/ReactiveCocoa.git (push)
Кроме того, можно изменить URL-адрес с помощью приложения GitHub Desktop.
Предоставление маркера доступа
Чтобы получить доступ к GitHub, необходимо пройти проверку подлинности с помощью personal access token вместо пароля. Дополнительные сведения см. в разделе Создание personal access token.
Если вы обращаетесь к организации, которая использует единый вход SAML и используете personal access token (classic), вы также должны авторизовать personal access token для доступа к организации перед аутентификацией. Дополнительные сведения см. в разделах Сведения о проверке подлинности с помощью единого входа SAML и Авторизация personal access token для использования с единым входом SAML.
Проверить свои разрешения
При появлении запроса на ввод имени пользователя и пароля используйте учетную запись с доступом к репозиторию.
Совет. Если вы не хотите вводить учетные данные при каждом взаимодействии с удаленным репозиторием, можно включить кэширование учетных данных. Если кэширование учетных данных уже используется, убедитесь в том, что на компьютере кэшированы правильные учетные данные. Неправильные или устаревшие учетные данные не позволят пройти проверку подлинности.
Использование SSH
Если вы ранее настроили ключи SSH, можно использовать URL-адрес клонирования SSH вместо HTTPS. Дополнительные сведения см. в разделе Сведения об удаленных репозиториях.
Ошибка: репозиторий не найден
Если эта ошибка возникает при клонировании репозитория, это означает, что репозиторий не существует или у вас нет разрешения на доступ к нему. Существует несколько решений для этой ошибки в зависимости от причины.
Проверка правильности написания
Всегда есть вероятность опечатки. Кроме того, в именах репозиториев учитывается регистр символов. Если вы попытаетесь клонировать git@github.com:user/repo.git, но репозиторий на самом деле называется User/Repo, произойдет эта ошибка.
Чтобы избежать этой ошибки, при клонировании всегда копируйте URL-адрес клона со страницы репозитория, а затем вставляйте его. Дополнительные сведения см. в разделе Клонирование репозитория.
Сведения об обновлении удаленного репозитория см. в разделе Управление удаленными репозиториями.
Проверка разрешений
Если вы пытаетесь клонировать частный репозиторий, но не имеете разрешения на его просмотр, произойдет эта ошибка.
Убедитесь в том, что у вас есть один из следующих уровней доступа:
- владелец репозитория;
- участник совместной работы над репозиторием;
- участник команды, которая имеет доступ к репозиторию (если репозиторий принадлежит организации).
Проверка доступа по протоколу SSH
В редких случаях может отсутствовать доступ к репозиторию по протоколу SSH из-за неправильной настройки.
Убедитесь в том, что используемый ключ SSH связан с личной учетной записью на GitHub. Это можно проверить, введя в командную строку следующую команду:
$ ssh -T git@github.com
> Hi USERNAME! You've successfully authenticated, but GitHub does not
> provide shell access.
Если репозиторий принадлежит организации и вы используете ключ SSH, созданный приложением OAuth, доступ к приложению может быть ограничен владельцем организации. Дополнительные сведения см. в разделе Сведения об ограничениях доступа к приложению OAuth.
Дополнительные сведения см. в разделе Добавление нового ключа SSH в учетную запись GitHub.
Проверка существования репозитория
Если все остальное не удается, убедитесь, что репозиторий действительно существует в GitHub.com!
Если вы пытаетесь выполнить отправку в несуществующий репозиторий, произойдет эта ошибка.
Ошибка: файл HEAD удаленного репозитория ссылается на несуществующую ветвь; не удалось выполнить извлечение
Эта ошибка возникает, если в GitHub.com удалена ветвь репозитория по умолчанию.
Обнаружить эту ошибку легко: GIT предупредит вас при попытке клонировать репозиторий:
$ git clone https://github.com/USER/REPO.git
# Clone a repo
> Cloning into 'repo'...
> remote: Counting objects: 66179, done.
> remote: Compressing objects: 100% (15587/15587), done.
> remote: Total 66179 (delta 46985), reused 65596 (delta 46402)
> Receiving objects: 100% (66179/66179), 51.66 MiB | 667 KiB/s, done.
> Resolving deltas: 100% (46985/46985), done.
> warning: remote HEAD refers to nonexistent ref, unable to checkout.
Чтобы устранить эту ошибку, необходимо быть администратором репозитория в GitHub.com.
Вам потребуется изменить ветвь по умолчанию репозитория.
После этого можно получить список всех доступных ветвей из командной строки:
$ git branch -a
# Lists ALL the branches
> remotes/origin/awesome
> remotes/origin/more-work
> remotes/origin/new-main
Затем можно просто переключиться на новую ветвь:
$ git checkout new-main
# Create and checkout a tracking branch
> Branch new-main set up to track remote branch new-main from origin.
> Switched to a new branch 'new-main'
In VS 2022 (17.0 or 17.1), when performing a Git clone of any repo (I’ve only tested those in our Azure DevOps instance, but I don’t suspect the repos are the issue), I get a VS error dialog with only the message CloneCommand.ExecuteClone.

The Output window has this error pattern repeated 13 times, with the line referencing git-sh-i18n only found after the last error block, like so (the git-sh-i18n file is present, I assume the error is related to a language file it’s unable to find):
Updating files: 100% (4649/4649), done.
0 [main] sh 1930 c:program filesmicrosoft visual studio2022enterprisecommon7idecommonextensionsmicrosoftteamfoundationteam explorerGitusrbinsh.exe: *** fatal error in forked process - fork: can't reserve memory for parent stack 0x4E00000 - 0x5000000, (child has 0x4A00000 - 0x4C00000), Win32 error 487
1301 [main] sh 1930 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
1 [main] sh 1929 dofork: child -1 - forked process 17816 died unexpectedly, retry 0, exit code 0x100, errno 11
c:/program files/microsoft visual studio/2022/enterprise/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/libexec/git-coregit-submodule: fork: retry: Resource temporarily unavailable
/mingw32/libexec/git-core/git-sh-setup: line 46: /git-sh-i18n: No such file or directory
The sh.exe.stackdump file has no other file references or useful info, just 3 lines of memory locations.
It seems like it might be a Cygwin memory allocation issue — I’ve read it has issues with fixed memory locations. Similar issues reference a need to exclude ASLR for git executables, PATH environment variable issues, having WSL2 installed, or 32- vs 64-bit client issues, but I haven’t found a good solution yet and I’m not certain when it started.
I do have WSL2 installed, and the latest 64-bit Git for Windows (2.35.1.2).
In VS 2022 (17.0 or 17.1), when performing a Git clone of any repo (I’ve only tested those in our Azure DevOps instance, but I don’t suspect the repos are the issue), I get a VS error dialog with only the message CloneCommand.ExecuteClone.

The Output window has this error pattern repeated 13 times, with the line referencing git-sh-i18n only found after the last error block, like so (the git-sh-i18n file is present, I assume the error is related to a language file it’s unable to find):
Updating files: 100% (4649/4649), done.
0 [main] sh 1930 c:program filesmicrosoft visual studio2022enterprisecommon7idecommonextensionsmicrosoftteamfoundationteam explorerGitusrbinsh.exe: *** fatal error in forked process - fork: can't reserve memory for parent stack 0x4E00000 - 0x5000000, (child has 0x4A00000 - 0x4C00000), Win32 error 487
1301 [main] sh 1930 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
1 [main] sh 1929 dofork: child -1 - forked process 17816 died unexpectedly, retry 0, exit code 0x100, errno 11
c:/program files/microsoft visual studio/2022/enterprise/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/libexec/git-coregit-submodule: fork: retry: Resource temporarily unavailable
/mingw32/libexec/git-core/git-sh-setup: line 46: /git-sh-i18n: No such file or directory
The sh.exe.stackdump file has no other file references or useful info, just 3 lines of memory locations.
It seems like it might be a Cygwin memory allocation issue — I’ve read it has issues with fixed memory locations. Similar issues reference a need to exclude ASLR for git executables, PATH environment variable issues, having WSL2 installed, or 32- vs 64-bit client issues, but I haven’t found a good solution yet and I’m not certain when it started.
I do have WSL2 installed, and the latest 64-bit Git for Windows (2.35.1.2).
Последние комментарии
Иван Александрович
27.01.2023, 18:36
Здравствуйте, подскажите пожалуйста, как сделать так чтобы слайдер рассчитывал размер блока с картинкой не в момент загрузки страницы, а после открыти…
Слайдер для сайта на чистом CSS и JavaScript
485
Дмитрий
27.01.2023, 11:04
«то использовать заполнители или сопровождать этот процесс какой-то анимацией.» — а как это примерно делается, у вас есть в уроках описание…
Получение и установка контента элементам в JavaScript
16
![]()
Александр Мальцев
25.01.2023, 14:46
Да, на MODX 2.8.x аналогично.
Создание формы для сайта на MODX с использованием FormIt
439
![]()
Александр Мальцев
23.01.2023, 06:53
Здравствуйте! Пожалуйста.
Если правильно понял задачу, то так:
const login = prompt(‘Введите логин?’);
if (login === null …
alert, prompt и confirm — диалоговые окна в JavaScript
29
Alexander_777
22.01.2023, 20:30
Огромное Вам спасибо! Действительно, очень изящное решение!
А вообще, так сказать, для общего развития — существуют какие-то функции или алгоритмы д…
Ассоциативные массивы в JavaScript
47
dj_Nikita
21.01.2023, 14:05
Александр. А как настроить скрипты, чтобы получился простой чат, типа как на Youtube. Было бы классно, если бы было так: Когда заходишь с нового устро…
Простой чат-бот для сайта на чистом JavaScript
50
Dem0n1c
18.01.2023, 09:40
Добрый день, наверняка здесь присутствует ошибка.
Метод has позволяет поверить в объекте FormData наличия указанного ключа.
// данный метод вернёт tru…
FormData — Объект JavaScript для кодирования данных формы
1
David
16.01.2023, 17:14
Спасибо за ответ!
Один раз IP определился вот так: 2a01:4450:c100:b192:f195:566:e7b3
Это тоже может быть с этим связано?
Как в PHP узнать IP пользователя и определить его страну?
32
Игорь
29.12.2022, 12:46
Здорово! Всего 3 строчки в html файле и работает реакт! А во всех обучающих видео зачем то
1) Формируют файл package.json
2) Cкачивают половину интер…
Что такое React и как он работает?
3
![]()
Виталий Алехин
28.12.2022, 21:52
function input()
{
var x=new ItcSimpleSlider(«.itcss»)
let y=document.getElementsByTagName(«input»)[0].value;
const index …
Простой адаптивный слайдер для сайта на чистом JavaScript
260
Email-рассылка
Не пропустите свежие статьи и уроки, подпишитесь на информационную рассылку
«itchief.ru». Отправка писем на почту раз в неделю!
Подписаться
Мне нужна помощь с проблемой аутентификации, с которой я столкнулся в Github/Jenkins.
Настройка выглядит следующим образом: Мастер Jenkins находится в Windows. Ведомый работает в OSX. Дженкинс может нормально общаться с ведомым.
При попытке извлечь из нашего частного репозитория git мы видим следующую ошибку, эта ошибка не возникает ни на главном, ни на других подчиненных устройствах Linux, и клоны отлично работают в терминале OSX.
Started by user xxxxxxxxxxxx
[EnvInject] - Loading node environment variables.
Building remotely on MAC01 in workspace /var/jenkins/workspace/xxxxxxxxxxxx
Checkout:NativeiOSSlots / /var/jenkins/workspace/xxxxxxxxxxxxx - hudson.remoting.Channel@166d8eb:MAC01
Using strategy: Default
Last Built Revision: Revision 7232678c31bf2c6f3c4bd5a66b349edf9288440c (origin/HEAD, origin/master)
Cloning the remote Git repository
Cloning repository <repo url>
git --version
git version 1.8.3.1
ERROR: Error cloning remote repo 'origin' : Could not clone <repo url>
hudson.plugins.git.GitException: Could not clone <repo url>
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:226)
at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.clone(AbstractGitAPIImpl.java:57)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:33)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1012)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:948)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2387)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
Caused by: hudson.plugins.git.GitException: Command "/Applications/GitHub.app/Contents/Resources/git/bin/git clone --progress -o origin <repo url> /var/jenkins/workspace/xxxxxxxxxx" returned status code 128:
stdout: Cloning into '/var/jenkins/workspace/xxxxxxxxxx'...
stderr: remote: Repository not found.
fatal: Authentication failed for '<repo url>'
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:790)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$100(CliGitAPIImpl.java:33)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:224)
... 14 more
Есть идеи?
4 ответы
Я столкнулся с той же проблемой. Дженкин не смог клонировать мой репозиторий git на локальный ПК.
Решение:
- Запустить services.msc
- перейти к сервису Jenkins и открыть его свойство
- перейдите на вкладку «Вход в систему» и укажите свое имя пользователя и пароль.
- перезапустите службу.
Эти шаги решили мою проблему, так как я указал там свой корпоративный логин и пароль.
Создан 19 сен.
Скорее всего, пользователь, которого запускает ведомое устройство Jenkins на вашем Mac, неправильно настроен для github (не имеет надлежащего сертификата). На моем ведомом Mac это пользователь по имени jenkins. Войдите в систему как этот пользователь на своем ведомом устройстве и посмотрите, сможете ли вы:
ssh -T git@github.com
Если это не работает, убедитесь, что у вас установлен правильный сертификат и что машина может видеть внешний мир.
ответ дан 31 авг.
Действительно ли он отлично клонируется с терминала при запуске от имени пользователя, работающего с jenkins?
Вероятно, вы неправильно настроили доступ по SSH. Посмотри это: Не удалось клонировать репозиторий
ответ дан 23 мая ’17, 12:05
У меня также была эта проблема. В итоге мне пришлось понизить версию плагина Git Client до 1.6.4. Когда я запускал 1.8.0, я получал эту ошибку для каждого репо, которое я пытался клонировать. Как только я откатился назад, все заработало.
ответ дан 24 апр.
Не тот ответ, который вы ищете? Просмотрите другие вопросы с метками
macos
github
jenkins
slave
or задайте свой вопрос.
Using command line, I can clone my public repos but cannot clone my private repos.
I have many private repos — and have been branching, committing, etc with no problems. But, today things seem to have broken. When I try to clone a repo, I get
Cloning into ‘XYZRepo’…
remote: Repository not found.
fatal: repository ‘https://github.com/user/XYZRepo.git/’ not found
(uname and repo names have been changed).
I checked
* the clone address is correct (I copied it directly from the repo)
* git config —global user.name (and user.email) are correct
Also, I do not have any .git directory in the folders I’m trying to clone to.
Any ideas on what could be going on here?
asked Jul 26, 2016 at 23:20
tcstcs
3231 gold badge3 silver badges11 bronze badges
2
The source of the problem seems to have been the credential management.
If I cloned with the full username:password@ format (i.e. git clone https://:@github.com/user/XYZRepo.git» then the repo is found and cloned without generating any error.
To get to the source of the problem I read up on credential management… and still don’t understand how I see what credentials are stored and being used (it’s «magic»). So, I just reinstalled git and github clients — and the «magic» seems to be back.
NOTE: «—unset-all» might be a possible solution as well git credential.helper=cache never forgets the password?
answered Jul 27, 2016 at 11:39
tcstcs
3231 gold badge3 silver badges11 bronze badges
1
Using command line, I can clone my public repos but cannot clone my private repos.
I have many private repos — and have been branching, committing, etc with no problems. But, today things seem to have broken. When I try to clone a repo, I get
Cloning into ‘XYZRepo’…
remote: Repository not found.
fatal: repository ‘https://github.com/user/XYZRepo.git/’ not found
(uname and repo names have been changed).
I checked
* the clone address is correct (I copied it directly from the repo)
* git config —global user.name (and user.email) are correct
Also, I do not have any .git directory in the folders I’m trying to clone to.
Any ideas on what could be going on here?
asked Jul 26, 2016 at 23:20
tcstcs
3231 gold badge3 silver badges11 bronze badges
2
The source of the problem seems to have been the credential management.
If I cloned with the full username:password@ format (i.e. git clone https://:@github.com/user/XYZRepo.git» then the repo is found and cloned without generating any error.
To get to the source of the problem I read up on credential management… and still don’t understand how I see what credentials are stored and being used (it’s «magic»). So, I just reinstalled git and github clients — and the «magic» seems to be back.
NOTE: «—unset-all» might be a possible solution as well git credential.helper=cache never forgets the password?
answered Jul 27, 2016 at 11:39
tcstcs
3231 gold badge3 silver badges11 bronze badges
1