首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Git错误:在镜像存储库时未能推送一些参考信息

Git错误:在镜像存储库时未能推送一些参考信息
EN

Stack Overflow用户
提问于 2022-10-25 21:46:50
回答 1查看 50关注 0票数 0

我在git方面不是很有经验,但几个月前我设置了一个私有存储库的公共镜像,现在我希望将它更新到私有存储库的当前状态。

我遵循这里的说明,并且非常肯定这是我最初创建镜像时遵循的:

但是,这一次当我执行以下操作时:

代码语言:javascript
运行
复制
git clone --mirror https://github.com/billtubbs/process-observers.git
cd process-observers.git/
git push --mirror https://github.com/billtubbs/ml-obs.git

我得到了

代码语言:javascript
运行
复制
Enumerating objects: 991, done.
Counting objects: 100% (991/991), done.
Delta compression using up to 8 threads
Compressing objects: 100% (261/261), done.
Writing objects: 100% (938/938), 2.27 MiB | 2.67 MiB/s, done.
Total 938 (delta 724), reused 889 (delta 677)
remote: Resolving deltas: 100% (724/724), completed with 40 local objects.
To https://github.com/billtubbs/ml-obs.git
 + 74c80ea...9ff3e6b main -> main (forced update)
   dce6fcc..9ff3e6b  origin/main -> origin/main
 * [new branch]      origin/HEAD -> origin/HEAD
 ! [remote rejected] refs/pull/1/head -> refs/pull/1/head (deny updating a hidden ref)
 ! [remote rejected] refs/pull/2/head -> refs/pull/2/head (deny updating a hidden ref)
error: failed to push some refs to 'https://github.com/billtubbs/ml-obs.git'

这是什么意思“没能把一些裁判推到.”?

所有文件似乎都被更新了。

EN

回答 1

Stack Overflow用户

发布于 2022-10-25 22:21:23

我想你在看医生的时候可能犯了个小错误。

尝试在--mirror命令中将选项git clone更改为--bare

就像在文档中写的一样:

  1. 创建存储库的裸露克隆。 $ git clone --bare https://github.com/EXAMPLE-USER/OLD-REPOSITORY.git
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74200529

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档