Comments (13)
在昨晚的自动推送中,能够完成同步,但是有一个空的仓库,gitment,注意添加到黑名单中。
有时会触发长时操作,我不太懂为啥(昨天晚上的被取消的手动同步,中间卡了1小时左右),但是有时又还好。全部同步加上部分仓库创建,总共15-16分钟(昨晚的定时同步)。如果配置上 cache 可能会更快的。
我看到你的同步方式是推送触发同步,但是你们的这个推送很多,如果是全部仓库同步的话,还是建议仅保留定时和手动模式,避免多数的仓库参与这个过程。
昨晚的手动同步:https://github.com/yi-Xu-0100/hub-mirror/runs/1783758871 1h 34m 12s 取消了后续
昨晚的定时同步:https://github.com/yi-Xu-0100/hub-mirror/runs/1786236025 16m 26s
今天的手动同步(cache 后,clone 方式为 https,设置了空仓库为黑名单,同步成功 ):https://github.com/yi-Xu-0100/hub-mirror/runs/1791642193 1h 3m 23s (此处有2次 git push 超时问题,第一次:Fri, 29 Jan 2021 12:56:45 GMT---Fri, 29 Jan 2021 13:26:46 GMT ,第二次:Fri, 29 Jan 2021 13:27:59 GMT---Fri, 29 Jan 2021 13:57:59 GMT,去除超时的 1h,在 cache 的情况下为 3m 23s )
默认的 timemout 为 30min,可以设置。
from hub-mirror-action.
这个其实问题发生,其实反映了一些问题,对token、秘钥的配置,在doc还是说明的不是很好,需要改进下文档。
另外,为了让此类问题能够快速闭环和避免,是否有必要搞个微信群,让有疑问的同学快速交流一下?
以便像 @yi-Xu-0100 这种专业又热心的资深用户&贡献者,可以帮助下新同学?
from hub-mirror-action.
@Ir1d 是否指定 count_type?
account_type: org
from hub-mirror-action.
@yi-Xu-0100 是的已经指定, run log 在 https://github.com/OI-wiki/OI-wiki/runs/1756862119?check_suite_focus=true
from hub-mirror-action.
@Ir1d 在 debug 中看出确实与现在的参数部分相比,缺失 org 关键词,它创建 repo 的回复日志没有打印出来,可能得等作者修复这个错误,或者自行 fork 修复后,使用个人修正版先用着。
from hub-mirror-action.
@yi-Xu-0100 感谢,求问你知道这个 org 需要填啥吗(
from hub-mirror-action.
@Ir1d 额,我重新确认了下, 这里的 org 其实就是对应的组织名,也就是它这里的处理方式是对的😥。但是由于没有回复日志我没法确定该请求是如何被回应的,猜测是不是 access_token 错误了?需要用到组织的 token,建议排查一下
你可以自行将相关的字段填入到你发的 api 说明的链接中,下方有测试,可以试试能否成功创建仓库和相应的回复是什么。
看的出来作者仅填写了 access_token 和 name,并将 org 字段替换为组织名,符合 api 的规则。可能出错的,只能是 access_token 问题造成未创建仓库了。
from hub-mirror-action.
@Ir1d 我测试了组织仓库同步。https://github.com/yi-Xu-0100/hub-mirror/actions?query=workflow%3Async2gitee%28list%29-org
我甚至能够完成对 OI-wiki 的部分仓库同步,但是似乎 gitee 的推送太慢,我就取消了(这里可以试试 ssh 是否会加快,或者尝试 cache 方式同步,第二次就会快了)。但是已经有一些是支持的,说明整个过程是没有问题的。我能猜测到的问题是 access_token 的问题,该 token 只会用于创建新仓库。
对于 gitee api 页面的测试也是可以尝试的,我直接在那个页面测试的结果也是可以直接创建的。 org 对应的就是组织名称。
access_token 是组织管理员的生成的 token ,我不太确定是否有时效说法,或者尝试重新创建并添加到 secret 中。
from hub-mirror-action.
@Ir1d 抱歉最近比较忙,没及时回复。大致看了下你的配置是没问题的。
大概率是token权限不足,导致的创建目的端(gitee侧)仓库失败。
from hub-mirror-action.
谢谢二位相助,我研究一下, token 所用账户是 org 的创建者,所以之前没往这方面想,我检查一下
from hub-mirror-action.
https://github.com/marketplace/actions/gitee-pages-action
看到一个写的不错的文档
from hub-mirror-action.
在同步org下的代码仓库时,同步失败,查看日志,发现GITEE_TOKEN获取不到。
经排查同步成功后,将情况在此分享:
如果同步脚本(.github/workflows/xxx.yaml)所在仓库(假设是sync-to-gitee)是私有的,
这种情况下,需要去sync-to-gitee仓库-->setting-->secrets下设置GITEE_TOKEN,因为在org-->settings-->secrets下配置的只能用于公共仓库。
同理:GITEE_PRIVATE_KEY应该也是一样。
from hub-mirror-action.
@xiecf-wh 感谢分享,这个是github secrets的权限管理机制,详情可以看[1]。
因为在org-->settings-->secrets下配置的只能用于公共仓库。
这个不完全正确,组织管理员可设置org secrets对具体仓库的可见性[2]。
需要去sync-to-gitee仓库-->setting-->secrets下设置GITEE_TOKEN
这个是比较推荐的形式,action在哪用,就在哪个repo设置secrets。
[1] https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-an-organization
[2] https://docs.github.com/en/actions/reference/encrypted-secrets#reviewing-access-to-organization-level-secrets
from hub-mirror-action.
Related Issues (20)
- 希望可以对自建Gitea进行支持 HOT 3
- 公共仓库间同步失败 HOT 4
- github 仓库同步到 gitee 仓库失败
- 希望可以添加对 sourcehut 的支持
- 希望添加清理缓存的功能 HOT 4
- 希望增加打印已成功仓库日志 HOT 9
- AttributeError: 'Hub' object has no attribute 'src_repo_base' HOT 4
- hub_mirror-action@v运行缓慢 HOT 2
- 为什么运行同步一直在下载系统安装东西,卡十几分钟都不行 HOT 5
- 同步目标源时创建仓库返回502 HOT 1
- 希望增加对codeup的支持
- 同步非private,但是fork的仓库同步如何做? HOT 2
- 应该如何避免总任务超时 HOT 2
- 同步gitee 失败 HOT 1
- error in gitee 同步github HOT 2
- github action处理python包PyYAML报错 HOT 2
- 【HELP】最近失败的频率有点高 HOT 1
- Permission denied (publickey) HOT 4
- 使用 Yikun/hub-mirror-action@master 报错 HOT 4
- HTTP 500 error code for repo query on gitee.com HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hub-mirror-action.