Github ошибка при скачивании

If you're having trouble cloning a repository, check these common errors.

HTTPS cloning errors

There are a few common errors when using HTTPS with Git. These errors usually indicate you have an old version of Git, or you don’t have access to the repository.

Here’s an example of an HTTPS error you might receive:

> 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?

Check your Git version

There’s no minimum Git version necessary to interact with GitHub, but we’ve found version 1.7.10 to be a comfortable stable version that’s available on many platforms. You can always download the latest version on the Git website.

Ensure the remote is correct

The repository you’re trying to fetch must exist on GitHub.com, and the URL is case-sensitive.

You can find the URL of the local repository by opening the command line and
typing 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)

Alternatively, you can change the URL through our
GitHub Desktop application.

Provide an access token

To access GitHub, you must authenticate with a personal access token instead of your password. For more information, see «Creating a personal access token.»

If you are accessing an organization that uses SAML SSO and you are using a personal access token (classic), you must also authorize your personal access token to access the organization before you authenticate. For more information, see «About authentication with SAML single sign-on» and «Authorizing a personal access token for use with SAML single sign-on.»

Check your permissions

When prompted for a username and password, make sure you use an account that has access to the repository.

Tip: If you don’t want to enter your credentials every time you interact with the remote repository, you can turn on credential caching. If you are already using credential caching, please make sure that your computer has the correct credentials cached. Incorrect or out of date credentials will cause authentication to fail.

Use SSH instead

If you’ve previously set up SSH keys, you can use the SSH clone URL instead of HTTPS. For more information, see «About remote repositories.»

Error: Repository not found

If you see this error when cloning a repository, it means that the repository does not exist or you do not have permission to access it. There are a few solutions to this error, depending on the cause.

Check your spelling

Typos happen, and repository names are case-sensitive. If you try to clone git@github.com:user/repo.git, but the repository is really named User/Repo you will receive this error.

To avoid this error, when cloning, always copy and paste the clone URL from the repository’s page. For more information, see «Cloning a repository.»

To update the remote on an existing repository, see «Managing remote repositories».

Checking your permissions

If you are trying to clone a private repository but do not have permission to view the repository, you will receive this error.

Make sure that you have access to the repository in one of these ways:

  • The owner of the repository
  • A collaborator on the repository
  • A member of a team that has access to the repository (if the repository belongs to an organization)

Check your SSH access

In rare circumstances, you may not have the proper SSH access to a repository.

You should ensure that the SSH key you are using is attached to your personal account on GitHub. You can check this by typing
the following into the command line:

$ ssh -T git@github.com
> Hi USERNAME! You've successfully authenticated, but GitHub does not
> provide shell access.

If the repository belongs to an organization and you’re using an SSH key generated by an OAuth App, OAuth App access may have been restricted by an organization owner. For more information, see «About OAuth App access restrictions.»

For more information, see Adding a new SSH key to your GitHub account.

Check that the repository really exists

If all else fails, make sure that the repository really exists on GitHub.com!
If you’re trying to push to a repository that doesn’t exist, you’ll get this error.

Error: Remote HEAD refers to nonexistent ref, unable to checkout

This error occurs if the default branch of a repository has been deleted on GitHub.com.

Detecting this error is simple; Git will warn you when you try to clone the repository:

$ 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.

To fix the error, you’ll need to be an administrator of the repository on GitHub.com.
You’ll want to change the default branch of the repository.

After that, you can get a list of all the available branches from the command line:

$ git branch -a
# Lists ALL the branches
>   remotes/origin/awesome
>   remotes/origin/more-work
>   remotes/origin/new-main

Then, you can just switch to your new branch:

$ 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'

1471 / 826 / 140

Регистрация: 12.10.2013

Сообщений: 5,456

1

09.01.2021, 22:23. Показов 17540. Ответов 8


github не скачивает zip проекта

download zip ошибка.

github не скачивает zip проекта

Это у всех такой баг? Альтернативы как скачать?
https://github.com/erincatto/box2d-lite



0



Администратор

Эксперт .NET

15249 / 12288 / 4904

Регистрация: 17.03.2014

Сообщений: 24,887

Записей в блоге: 1

09.01.2021, 22:29

2

Excalibur921, у меня работает скачивание.



0



1471 / 826 / 140

Регистрация: 12.10.2013

Сообщений: 5,456

09.01.2021, 23:15

 [ТС]

3

В 3 браузерах не пашет…что ж такое.
В google Chrome вызвал Настройка прокси сервера.
Ввел а всеравно не пашет.

Что у вас там введено? Может Windows Firewall with Advanced Security win7 что-то блокирует? Офнута нужная служба?

github не скачивает zip проекта

github не скачивает zip проекта

github не скачивает zip проекта

opera

github не скачивает zip проекта



0



Администратор

Эксперт .NET

15249 / 12288 / 4904

Регистрация: 17.03.2014

Сообщений: 24,887

Записей в блоге: 1

09.01.2021, 23:17

4

Excalibur921, я не использую прокси.

Цитата
Сообщение от Excalibur921
Посмотреть сообщение

Ввел а всеравно не пашет.

Возможно что-то на стороне провайдера.

Цитата
Сообщение от Excalibur921
Посмотреть сообщение

Может Windows Firewall with Advanced Security win7 что-то блокирует?

Врядли, но кто мешает отключить её и проверить?



0



1471 / 826 / 140

Регистрация: 12.10.2013

Сообщений: 5,456

09.01.2021, 23:36

 [ТС]

5

Хз как пофиксить. Такой баг давно.



0



1471 / 826 / 140

Регистрация: 12.10.2013

Сообщений: 5,456

09.01.2021, 23:43

 [ТС]

6

download master eror 10061

github не скачивает zip проекта



0



Эксперт .NET

8894 / 5669 / 1351

Регистрация: 25.05.2015

Сообщений: 17,216

Записей в блоге: 14

10.01.2021, 05:08

7

Excalibur921, может вы на санкционной территории находитесь?



0



1471 / 826 / 140

Регистрация: 12.10.2013

Сообщений: 5,456

10.01.2021, 13:36

 [ТС]

8

Так по 1 файлу качаю вручную но это мрак. Восстанавливать структуру каталогов… Наверно это мой баг из-за ковыряния в реестре и службах.

А может как-то анонимайзером качнуть?



0



Эксперт .NET

8894 / 5669 / 1351

Регистрация: 25.05.2015

Сообщений: 17,216

Записей в блоге: 14

10.01.2021, 13:37

9



0



Я пытаюсь загрузить проект с GitHub, над которым я работаю, но получаю следующую ошибку:

ваши локальные изменения в следующих файлах будут перезаписаны слиянием

Я попытался выполнить слияние: git mergetool {pathtofile}

Но он просто ответил: «Файл не нужно объединять».

Если я попытаюсь сначала внести свои изменения, я получаю:

To prevent you from losing history, non-fast-forward updates were rejected.

Что я могу упустить?

2 ответа

Лучший ответ

В своем вопросе вы цитируете следующее сообщение об ошибке:

ваши локальные изменения в следующих файлах будут перезаписаны слиянием

Это сообщение об ошибке, по сути, говорит о том, что git предотвращает потерю работы. У вас есть некоторые изменения в вашем рабочем дереве, которые вы еще не зафиксировали, и извлечение изменит эти файлы — это может закончиться тем, что вы потеряете свои локальные изменения. Как только вы зафиксируете свои изменения в этих файлах, извлечение будет работать. (Или вы можете пропустить этап «выборки» git pull и просто запустить git merge origin/master, чтобы снова попробовать этап слияния.) Ответ Мартина Огдена дает пример использования git stash в качестве альтернативы, которая более подходит, если вы не готовы выполнить свою работу. пока что.

Последнее сообщение об ошибке:

To prevent you from losing history, non-fast-forward updates were rejected.

По сути, вам разрешено нажимать только в том случае, если коммит, который вы нажимаете, уже содержит историю ветки, на которую вы нажимаете. Обычное решение — сначала потянуть. Это еще одно сообщение об ошибке, которое не позволяет вам потерять работу — вы (как правило) не захотите уничтожить работу, которую другие люди отправили в эту ветку.


4

Community
23 Май 2017 в 14:43

Вы могли либо:

  1. Добавить / зафиксировать локальные изменения перед извлечением из удаленного репозитория
  2. Сохраните локальные изменения перед извлечением и вставьте локальные изменения обратно после извлечения:

    git stash --include-untracked
    git pull
    git stash pop
    


1

Martin Ogden
25 Сен 2011 в 16:08

Вчера после долгого заброса я наконец закончил GitHub GitHub repository-f-zyj / ACM, в который я поместил написанный мной код и ресурсы, организованные для ACMACM за последние два года.

Сегодня я загрузил несколько файлов PDFPDF, но не ожидал, что сообщу об ошибке, потому что они были слишком большими:

remote: warning: File xxx/…/xxx.xxx is 51.00 MB; this is larger than GitHub’s recommended maximum file size of 50 MB

Сообщение об ошибке ясно сообщает нам, насколько велик файл xxx /… / xxx.xxxxxx /… / xxx.xxx, а максимальный предел GitHub GitHub состоит в том, что размер файла не может превышать 50 МБ 50 МБ, поэтому я принял это как должное и удалил большой файл напрямую. Затем addadd и commitcommit, но проблема все еще существует, и сообщение об ошибке остается без изменений.

Подумав об этом, возможно, это потому, что он был добавлен и зафиксирован для удаления таким образом, поэтому я использовал git rm -r —cached file_path git rm -r —cached file_path, повторно добавить и затем зафиксировать, но сообщение об ошибке все равно остается тем же, когда нажимается .

После долгих поисков я нашел следующую команду из блога крупного парня для решения проблемы:

git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch *.sql'

Здесь вам нужно заменить * .sql на xxx /… / xxx.xxxxxx /… / xxx.xxx, указанный в сообщении об ошибке.

Примечание: изменить Замените .sql своим именем или типом файла. Будьте очень осторожны, потому что это будет проходить при каждой отправке и извлекать этот тип файла.*

Наконец, будьте осторожны, чтобы не загружать слишком большие файлы, 50 M50 M — это красная линия.

тогдаgit pushТакже может быть такая ошибка:non-fast-forward

Причина проблемы (без перемотки вперед) в том, что часть кода уже есть в репозитории git, поэтому она не позволяет вам напрямую перезаписывать ваш код. Итак, у вас есть 2 варианта:

1. Принудительное нажатие, то есть использование сильного покрытия для замены содержимого в репозитории git вашим локальным кодом.

git push -f

2. Сначала загрузите git на свой локальный компьютер, затем объедините, а затем нажмите

$ git fetch

$ git merge

Эти две команды эквивалентны

$ git pull  

Однако в это время возникли следующие проблемы:

[Ветвь «master»], которая появляется выше, должна быть чистой (.git / config) следующим образом
[branch “master”]
remote = origin
merge = refs/heads/master

Это эквивалентно сообщению git двух вещей:
1. Когда вы находитесь в главной ветке, удаленным по умолчанию является origin.

2. Когда вы используете git pull для главной ветки без указания удаленного и ветвления, тогда git будет использовать пульт по умолчанию (то есть origin) для объединения всех изменений в главной ветке.
Если вы не хотите или не можете редактировать файл конфигурации, вы можете ввести следующую командную строку в кусте:

$ git config branch.master.remote origin  
$ git config branch.master.merge refs/heads/master

Затем повторно выполните git pull. Наконец, git нажмите свой код. теперь работает ~

Ссылка на ссылку:https://blog.csdn.net/sinat_25306771/article/details/55257901

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Github ошибка 403
  • Github как изменить язык на сайте
  • Github как изменить название pull request
  • Github как изменить имя пользователя
  • Github как изменить private на public

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии