TruCol / Self-host-GitLab-CI-for-GitHub

Installs your own GitLab CI and runs it on all your GitHub repos, in a single command.
GNU Affero General Public License v3.0
4 stars 3 forks source link

Include check to verify user has git clone SSH access as prerequisite. #118

Closed a-t-0 closed 2 years ago

a-t-0 commented 2 years ago

Currently, deleting all SSH credentials, rebooting and cloning, e.g.:

git clone git@github.com:a-t-0/gitlab-ci-build-statuses.git

Yields:

Cloning into 'gitlab-ci-build-statuses'...
The authenticity of host 'github.com (140.82.121.4)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

This prevents the function that sets the GitHub SSH deploy key from working properly. This is because that function clones the the gitlab-ci-build-statuses repository a few times for testing purposes.

a-t-0 commented 2 years ago

It is not required for setting the GitHub SSH deploy key, however, it may be used for other cases. This can be resolved by :

a-t-0 commented 2 years ago

Check if the user has GitHub SSH access before starting as prerequisite check.

a-t-0 commented 2 years ago

Completed by creating a basic GitHub SSH access check in the prerequisites.