GithubHelp home page GithubHelp logo

请教下 about hub-mirror-action HOT 7 CLOSED

yikun avatar yikun commented on August 10, 2024
请教下

from hub-mirror-action.

Comments (7)

yfdoor avatar yfdoor commented on August 10, 2024

log:

2020-03-07T09:31:05.3131490Z ++ src
2020-03-07T09:31:05.3131622Z /entrypoint.sh: line 26: src: command not found
2020-03-07T09:31:05.3131886Z ++ '[github'
2020-03-07T09:31:05.3132025Z /entrypoint.sh: line 26: [github: command not found
2020-03-07T09:31:05.3132286Z ++ 'gittee]/account'
2020-03-07T09:31:05.3132435Z /entrypoint.sh: line 26: gittee]/account: No such file or directory
2020-03-07T09:31:05.3132731Z + echo 'Unknown src args, the should be '
2020-03-07T09:31:05.3132867Z + exit 1
2020-03-07T09:31:05.3132998Z Unknown src args, the should be
2020-03-07T09:31:05.4594986Z Cleaning up orphan processes

from hub-mirror-action.

Yikun avatar Yikun commented on August 10, 2024

@yfdoor 抱歉,目前仅支持组织账号,会在最近增加普通账号的权限。See #8

这两个有区别吗?

有区别的:

  • dst_token,这个是用来push代码的token
  • dst_key,这个是用来访问目的端API的key,仅用于创建目的端的repo,即当目的端repo不存在的时候,会自动创建。

from hub-mirror-action.

yfdoor avatar yfdoor commented on August 10, 2024

@yfdoor 抱歉,目前仅支持组织账号,会在最近增加普通账号的权限。See #8

这两个有区别吗?

有区别的:

  • dst_token,这个是用来push代码的token
  • dst_key,这个是用来访问目的端API的key,仅用于创建目的端的repo,即当目的端repo不存在的时候,会自动创建。

我在gitee 建了一个私钥,赋予了repo的权限。再在github这边将这个私钥赋予一个token,然后 dst_token 和dst_key 都设成这个token。运行不成功。或者说是dst_key需要其他值。谢谢

from hub-mirror-action.

Yikun avatar Yikun commented on August 10, 2024

@yfdoor

对于目的端为Gittee来说:
dst_key 指的是https://gitee.com/profile/sshkeys
dst_token 指的是https://gitee.com/profile/personal_access_tokens

对于目的端为Github来说:
dst_key 指的是https://github.com/settings/keys
dst_token 指的是 https://github.com/settings/tokens

另外,目前仅支持组织账号同步,意思就是https://github.com/org/xxxhttps://gitee.com/org/xxx 哦。

其实支持很简单,当时没有做,你可以试试提个PR。:)

可以新加个选项,is_org默认为False,然后根据这个Flag去set获取list和create repo的API。

from hub-mirror-action.

Yikun avatar Yikun commented on August 10, 2024

已支持,See #9

steps:
  - name: Hub Mirror Action.
    uses: Yikun/[email protected]
    with:
      src: github/yfdoor
      dst: gitee/yfdoor
      dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
      dst_token: ${{ secrets.GITEE_TOKEN }}

from hub-mirror-action.

Yikun avatar Yikun commented on August 10, 2024

如果没啥其他问题,我先关了,有问题再re-open。: )

from hub-mirror-action.

yfdoor avatar yfdoor commented on August 10, 2024

如果没啥其他问题,我先关了,有问题再re-open。: )

目前这个项目是只支持账户间的同步吗,有计划做成支持账户下某个repo 的同步吗?
还有就是关于 dst_token 和dst_key 的问题,还是需要请教下:
我看demo 中的示例只需要填写目的端 gitee 的 token 和 key

  1. token:我可以在 gitee 生成一个私人令牌 https://gitee.com/profile/personal_access_tokens ,然后需要把他添加到gihub 的哪里呢? 不会是某个 repo setting 中的Secrets 下吧,难道要在所有的 repo setting 里都添加?
  2. ssh key:我了解这个是用来让 github 连接 gitee 的 ,可是如何生成 gitee 的 公钥呢, 这里https://gitee.com/profile/sshkeys 只能添加外部连接 gitee 的 ssh key,可是如何生成 gitee 自己的 key 添加到 gihub 里呢?

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

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.