Skip to content

Copy complete repo from GitHub to GitLab in 1 single go. #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
5 tasks
a-t-0 opened this issue Oct 15, 2022 · 3 comments
Open
5 tasks

Copy complete repo from GitHub to GitLab in 1 single go. #128

a-t-0 opened this issue Oct 15, 2022 · 3 comments
Milestone

Comments

@a-t-0
Copy link
Member

a-t-0 commented Oct 15, 2022

Currently, this repository evaluates all commits in a GitHub repository and for each commit with a .GitLab-CI.yml, it will:
0. Clone the repository from GitHub to local

  1. Ddelete the repository if it already exists in the GitLab server
  2. Push the repository to the GitLab server.
  3. Run the CI on that commit and push the build status of that commit result back to GitHub.
    This is inefficient, because one could also clone the complete repository into GitLab at once, (and wait until all build statusses have been computed in GitLab before pushing the build status results back to GitLab). Look at: run_ci_on_github_repo() { in here.
  • Find a way to clone the complete repository at once to GitLab (Integrating this code in automatic GitLab server deployment ubc/github2gitlab#1)
  • Update the code to wait until all build statusses have been computed in GitLab, and push the new build status badges once for the complete cloned repository, back to GitHub.
  • Allow user to specify an option: "Monitor and push build status batches continuously" in case they want to have a more frequent build status updating after the clone, at the cost of consuming more GitHub push bandwidth.
    • Do constantly monitor the build statusses in GitLab and automatically push the buildstatus to GitHub if a build is completed. (Ideally with a post-receive script).
  • Allow the user to specify GitLab starts computing build statusses from most recent commit backwards.
@a-t-0
Copy link
Member Author

a-t-0 commented Feb 22, 2023

Probably because no https is supported yet.

(base) name@name:~/git$ git clone [email protected]:root/sponsor_example.git
Cloning into 'sponsor_example'...
kex_exchange_identification: read: Connection reset by peer
Connection reset by 127.0.0.1 port 444
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
(base) name@name:~/git$ git clone [email protected]:root/sponsor_example.git
Cloning into 'sponsor_example'...
kex_exchange_identification: Connection closed by remote host
Connection closed by 127.0.0.1 port 80
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
(base) name@name:~/git$ git clone [email protected]:root/sponsor_example.git
Cloning into 'sponsor_example'...
ssh: connect to host 127.0.0.1 port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

@a-t-0
Copy link
Member Author

a-t-0 commented Feb 22, 2023

touch ~/.ssh/config

and put content:

Host 127.0.0.1
  Hostname 127.0.0.1
  User root
  Port 444
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_ed25519

to make git push for gitlab go over certain port with specific ssh key.

@a-t-0
Copy link
Member Author

a-t-0 commented Feb 22, 2023

Old command with decayed token:

github2gitlab    --gitlab-url http://127.0.0.1    --gitlab-token sometoken    --github-repo a-t-0/sponsor_example --gitlab-username root

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant