[newbies] git fetch --all --tags (TOO MANY REFS)

Leonid Znamenok respublica на altlinux.org
Вт Окт 21 19:02:10 MSK 2025


21.10.2025 17:29, Alexander Lubyagin:
> Доброго времени суток.
>
> Подскажите, как правильно перенести большое количество тэгов из одного 
> репозитория - в другой? 

Скорее всего вам это не нужно. Собирается пакет из последнего тэга,
его и можно отправить. Все остальные не требуются.

Относительно организации удалённых репозиториев лучше использовать
следующую схему:

  origin         git://git.altlinux.org/gears/...
  workflow   gitery:packages/...
  upstream  ...

Чтобы вытащить актуальное состояние пакета:
  git pull origin

Отправлять, соответветственно, с помощью
  git push workflow *TAG*

Не нужно добавлять/удалять разные origin репозитории для этих действий.

> git push --tags ругается: Sorry, TOO MANY REFS (318) at once could not 
> be accepted, consider using remote clone
>
> Через поисковик решения не нашёл.
>
> См. лог
>
> $ git remote add src git://git.altlinux.org/gears/b/bind.git
> $ git remote -v
> origin    gitery:packages/bind.git (fetch)
> origin    gitery:packages/bind.git (push)
> src    git://git.altlinux.org/gears/b/bind.git (fetch)
> src    git://git.altlinux.org/gears/b/bind.git (push)
> $ git remote remove origin
> $ git fetch --all --tags --prune
> remote: Enumerating objects: 333323, done.
> remote: Counting objects: 100% (94971/94971), done.
> remote: Total 333323 (delta 94971), reused 94971 (delta 94971), 
> pack-reused 238352 (from 1)
> Receiving objects: 100% (333323/333323), 143.34 MiB | 10.14 MiB/s, done.
> Resolving deltas: 100% (272968/272968), completed with 10481 local 
> objects.
> From git://git.altlinux.org/gears/b/bind
>  * [new branch]            4.0                        -> src/4.0
>   ...
> $ git remote remove src
> $ git remote add origin gitery:packages/bind.git
> $ git push --tags
> Enter passphrase for key '/home/lk/.ssh/dfpl':
> Enumerating objects: 371021, done.
> Counting objects: 100% (364132/364132), done.
> Delta compression using up to 4 threads
> Compressing objects: 100% (72207/72207), done.
> Writing objects: 100% (355665/355665), 166.88 MiB | 8.08 MiB/s, done.
> Total 355665 (delta 290476), reused 344231 (delta 280072), pack-reused 
> 0 (from 0)
> remote: Resolving deltas: 100% (290476/290476), completed with 3754 
> local objects.
> remote: Sorry, TOO MANY REFS (318) at once could not be accepted, 
> consider using remote clone
> To gitery:packages/bind.git
>  ! [remote rejected]       8.3.1-alt1 -> 8.3.1-alt1 (pre-receive hook 
> declined)
>  ! [remote rejected]       9.10.4-alt0.M80P.1 -> 9.10.4-alt0.M80P.1 
> (pre-receive hook declined)
>  ! [remote rejected]       9.10.4-alt1 -> 9.10.4-alt1 (pre-receive 
> hook declined)
>  ! [remote rejected]       9.10.4-alt2 -> 9.10.4-alt2 (pre-receive 
> hook declined)
>  ! [remote rejected]       9.10.4.P8-alt0.M80P.1 -> 
> 9.10.4.P8-alt0.M80P.1 (pre-receive hook declined)
>  ! [remote rejected]       9.10.4.P8-alt1 -> 9.10.4.P8-alt1 
> (pre-receive hook declined)
>  ! [remote rejected]       9.10.6-alt0.M80C.1 -> 9.10.6-alt0.M80C.1 
> (pre-receive hook declined)
>  ! [remote rejected]       9.10.6-alt0.M80P.1 -> 9.10.6-alt0.M80P.1 
> (pre-receive hook declined)
>  ! [remote rejected]       9.10.6-alt1 -> 9.10.6-alt1 (pre-receive 
> hook declined)
>
>   ...
>
> =
>
> _______________________________________________
> devel-newbies mailing list
> devel-newbies на lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/devel-newbies

-- 
---
WBR, Leonid (respublica на altlinux.org)




Подробная информация о списке рассылки devel-newbies