GithubHelp home page GithubHelp logo

Comments (5)

Yikun avatar Yikun commented on August 10, 2024

目前这个项目是只支持账户间的同步吗,有计划做成支持账户下某个repo 的同步吗?

是的,目前只支持账户或者组织间的repo同步。

账户下某个repo同步这个需求感觉没那么强烈,导入可以通过import去做,然后,如果要是同步的话,可以给那个仓库add remote,每次push一把,就全同步了。

所以,可能只是周期同步这个点比较有用?

还有就是关于 dst_token 和dst_key 的问题,还是需要请教下

我解释下目的端token和ssh key的作用,

  • token,这个是用来在目的端创建仓库用的。
  • ssh key,这个是在action的机器中,往目的端push code用的,是私钥。

Token和key都是加到某一个repo的security里面,然后利用这个repo的workflow触发整个账户的同步,不需要在每个repo添加。

ssh key:我了解这个是用来让 github 连接 gitee 的 ,可是如何生成 gitee 的 公钥呢, 这里https://gitee.com/profile/sshkeys 只能添加外部连接 gitee 的 ssh key,可是如何生成 gitee 自己的 key 添加到 gihub 里呢?

确切的说,这个key是用来连接目的端的ssh key,通过这个ssh key,让这个action有权限去push代码。所以,你需要做的是

  1. 为目的端增加ssh key,把private key的内容先添加到目的端的sshkey中。
  2. 把这个key添加到触发repo的security。

不好意思,可能问题有些太基础了,可是还是不太了解,谢谢

感谢你的issue,文档确实还没整理的非常完善,也欢迎你贡献,或者提一些希望补充的点。

from hub-mirror-action.

Yikun avatar Yikun commented on August 10, 2024

目前这个项目是只支持账户间的同步吗,有计划做成支持账户下某个repo 的同步吗?

突然有个想法,可以给这个加个“白名单”的功能,比如,如果仅需要同步某一个库,可以在白名单里面指定。

steps:
- name: Mirror the Github organization repos to Gitee.
  uses: Yikun/hub-mirror-action@master
  with:
    src: github/kunpengcompute
    dst: gitee/kunpengcompute
    dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
    dst_token:  ${{ secrets.GITEE_TOKEN }}
    # 仅同步repo1和repo2
    white_list: "repo1,repo2"

这样做可能比较更具通用性。

from hub-mirror-action.

Yikun avatar Yikun commented on August 10, 2024

See #19

from hub-mirror-action.

Yikun avatar Yikun commented on August 10, 2024

白名单功能已支持 https://github.com/Yikun/hub-mirror-action/releases/tag/v0.06

from hub-mirror-action.

Yikun avatar Yikun commented on August 10, 2024

除此之外,还可以使用https://github.com/wearerequired/git-mirror-action 这个插件做单repo同步。

from hub-mirror-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.