GitHubのfine-grained access tokenとGitLabのミラー機能を利用して、GitLabからGitHubのリポジトリへとミラーを行う方法についての説明
特にすることは無いので省略
普通に作成
Fine-grained access tokenの作成ページから新たにtokenを生成する
必要な設定は以下の通り
- Repository access: "Only select repositories" でミラー先のリポジトリを指定する
- Repository permissions: "Contents" を "Read and write" にする (commitを許可する)
後で使うので忘れずにコピーする
Settings > Repository > Mirroring repositories
から設定できる
- URLのところには
https://[email protected]/user_name/project.git
を指定する[email protected]
であることに注意- GitHub側のリポジトリのhttpsのURLに対して
user_name@
を追加すれば良い
- Passwordのところには先程コピーしたaccess tokenを貼り付け
以上で設定完了