Sign inSign up

ayufan/gitlab-mirror-post-fetch

By ayufan

‱Updated over 11 years ago

Image
0

1.2K

ayufan/gitlab-mirror-post-fetch repository overview

⁠gitlab-mirror-post-fetch

Post fetch app compatible with https://github.com/dustin/gitmirror⁠

⁠Deploy to Heroku

  1. Create GitLab user (eg. GitMirror).
  2. Create GitLab group (eg. Mirrors) and give GitLab user owner permissions.
  3. Find GitLab user private token: https://my.gitlab.instance.com/profile/account⁠
  4. Create SSH private key and add it's public part to your GitLab
  5. Deploy
  6. And fill the forms:
    • GITLAB_PRIVATE_TOKEN: Private token
    • GITLAB_URL: Address of your GitLab instance
    • GITLAB_GROUP: Where all mirrors should be created
    • GITLAB_SSH_KEY: Paste here SSH private key
    • GITMIRROR_SECRET: Generate unique password that will secure your GitMirror installation
  7. Click Deploy For Free
  8. Open GitHub on project that you want to mirror. Go to Settings -> Webhooks & Services -> Add Webhook:
  9. Within a couple of seconds mirror should be created and should be run in sync.
  10. In case of error you can check Recent Deliveries and Response.

⁠Advanced Installation

go get github.com/ayufan/gitlab-mirror-post-fetch

⁠The Use
  1. Create GitLab user (eg. GitMirror).
  2. Create GitLab group (eg. Mirrors) and give GitLab user owner permissions.
  3. Find GitLab user private token: https://my.gitlab.instance.com/profile/account⁠
  4. Install https://github.com/dustin/gitmirror⁠
  5. Create bin/post-fetch script filling in the blanks:
#!/bin/bash

export GITLAB_PRIVATE_TOKEN=MY_GITMIRROR_USER_PRIVATE_TOKEN
export GITLAB_URL=https://my.gitlab.instance.com/
export GITLAB_GROUP=Mirrors

exec gitlab-mirror-post-fetch
  1. Give bin/post-fetch executable permissions: chmod +x bin/post-fetch
  2. Configure gitmirror script as described. Giving it or not secret.

⁠Author

Kamil TrzciƄski, Polidea⁠, 2014-2015

⁠License

MIT

Tag summary

Content type

Image

Digest

sha256:2698e964f


Size

175.3 MB

Last updated

almost 11 years ago

docker pull ayufan/gitlab-mirror-post-fetch