[magnum] Help / Pointers on mirroring https://opendev.org/starlingx in github.com for CNCF certification of starlingx

Qian, Bin Bin.Qian at windriver.com
Mon Feb 3 16:33:43 UTC 2020


Roman, 

That works on my account too with specifying my private key.

Thanks,


Bin

________________________________________
From: Roman Gorshunov [paye600 at gmail.com]
Sent: Monday, February 03, 2020 7:36 AM
To: openstack-discuss at lists.openstack.org
Cc: Qian, Bin
Subject: Re: [magnum] Help / Pointers on mirroring https://opendev.org/starlingx in github.com for CNCF certification of starlingx

Hello Bin,

Yes, that's correct. When you are connecting to the GitHub, your
username should be git. GitHub recognizes you by your SSH key [0].

Example:
  [roman at pc ~]$ ssh git at github.com
  PTY allocation request failed on channel 0
  Hi gorshunovr! You've successfully authenticated, but GitHub does
not provide shell access.
  Connection to github.com closed.
  [roman at pc ~]$
As you may see, GitHub has recognized me as 'gorshunovr', despite I
was using 'git' as a username for SSH.

[0] https://help.github.com/en/github/authenticating-to-github/testing-your-ssh-connection

Please, use mailing list for the communication, not direct e-mail. Thank you.

Best regards,
--
Roman Gorshunov

On Mon, Feb 3, 2020 at 3:53 PM Qian, Bin <Bin.Qian at windriver.com> wrote:
>
> Hi Roman,
>
> Thank you for the information about GitHub mirroring.
> Based on the info below, I think what we want to do is to:
> 1. create a GitHub account, which has the privilege to commit to our repos,
> 2. with the account, create ssh key on zuul server and upload the ssh key to GitHub
> 3. use zuul tool [3] to create zuul job secret, embed it to the upload job in zuul.yaml
> 4. add the upload job a post job
>
> But I am not very sure about the step 1, as in the reference [4] below, it states,
> "For GitHub, the user parameter is git, not your personal username."
>
> Would you please let me know if my steps above is correct?
>
> Thanks,
>
> Bin
>
> ________________________________
> From: Waines, Greg
> Sent: Thursday, January 30, 2020 10:21 AM
> To: Qian, Bin
> Cc: Eslimi, Dariush; Khalil, Ghada
> Subject: FW: [magnum] Help / Pointers on mirroring https://opendev.org/starlingx in github.com for CNCF certification of starlingx
>
> fyi
>
>
>
> From: Roman Gorshunov <paye600 at gmail.com>
> Date: Thursday, January 30, 2020 at 11:38 AM
> To: "openstack-discuss at lists.openstack.org" <openstack-discuss at lists.openstack.org>
> Subject: Re: [magnum] Help / Pointers on mirroring https://opendev.org/starlingx in github.com for CNCF certification of starlingx
>
>
>
> Hello Greg,
>
>
>
> - Create a GitHub account for the starlingx, you will have URL on
>
> GitHub like [0]. You may try to contact GitHub admins and ask to
>
> release starlingx name, as it seems to be unused.
>
> - Then create SSH key and upload onto GitHub for that account in
>
> GitHub interface
>
> - Create empty repositories under [1] to match your existing
>
> repositories names here [2]
>
> - Encrypt SSH private key as described here [3] or here [4] using this tool [5]
>
> - Create patch to all your projects under [2] to '/.zuul.yaml' file,
>
> similar to what is listed here [6]
>
> - Change job name shown on line 407 via URL above, description (line
>
> 409), git_mirror_repository variable (line 411), secret name (line 414
>
> and 418), and SSH key starting from line 424 to 463, to match your
>
> project's name, repo path on GitHub, and SSH key
>
> - Submit changes to Gerrit with patches for all your project and get
>
> them merged. If all goes good, the next change merged would trigger
>
> your repositories to be synced to GitHub. Status could be seen here
>
> [7] - search for your newly created job manes, they should be nested
>
> under "upload-git-mirrorMirrors a tested project repository to a
>
> remote git server."
>
>
>
> Hope it helps.
>
>
>
> [0] https://github.com/starlingxxxx
>
> [1] https://github.com/starlingxxxx/...
>
> [2] https://opendev.org/starlingx/...
>
> [3] https://docs.openstack.org/infra/manual/zuulv3.html#secret-variables
>
> [4] https://docs.openstack.org/infra/manual/creators.html#mirroring-projects-to-git-mirrors
>
> [5] https://opendev.org/zuul/zuul/src/branch/master/tools/encrypt_secret.py
>
> [6] https://opendev.org/airship/deckhand/src/commit/51dcea4fa12b0bcce65c381c286e61378a0826e2/.zuul.yaml#L406-L463
>
> [7] https://zuul.openstack.org/jobs
>
>
>
> Sample content of your addition (patch) to your '/.zuul.yaml' files:
>
> ===================================================
>
> - job:
>
>     name: starlingx-compile-upload-git-mirror
>
>     parent: upload-git-mirror
>
>     description: Mirrors starlingx/compile to starlingxxxx/compile
>
>     vars:
>
>       git_mirror_repository: starlingxxxx/compile
>
>     secrets:
>
>       - name: git_mirror_credentials
>
>         secret: starlingx-compile-github-secret
>
>         pass-to-parent: true
>
>
>
> - secret:
>
>     name: starlingx-compile-github-secret
>
>     data:
>
>       user: git
>
>       host: github.com
>
>       host_key: github.com ssh-rsa
>
> AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
>
>       ssh_key: !encrypted/pkcs1-oaep
>
>         - <here goes encrypted SSH private key>
>
> ===================================================
>
>
>
> Best regards,
>
> --
>
> Roman Gorshunov
>
>
>
>



More information about the openstack-discuss mailing list