Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
939 views
in Technique[技术] by (71.8m points)

continuous integration - Access GitHub within GitLab over deployed key from GitHub

I have one question since a while. The question is, is it possible to access GitHub within Gitlab over an deployed key(ssh key). Also an other solution could be possible, my main goal is, if an push is done into Github, Gitlab will register this and executes automation. What I try to prevent is, that GitLab has access to all repos within GitHub. GitHub OAuth and token doesn't work because it gives access to all my repos within Github.

Best Regards

question from:https://stackoverflow.com/questions/65885988/access-github-within-gitlab-over-deployed-key-from-github

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can do this via the Repository Mirroring option in Gitlab. This allows you to mirror a repository from Github, Bitbucket, etc to Gitlab, or from Gitlab to another service.

To pull into Gitlab, first create a new project in Gitlab then go to Settings, Repository, Mirroring Repositories and set it up however you require. The full details are available in their documentation: https://docs.gitlab.com/ee/user/project/repository/repository_mirroring.html#pulling-from-a-remote-repository

Note that for now, this is a paid feature so you must have starter/core or above.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...