user3559247
user3559247

Reputation: 1228

How to update my known_hosts file for my jenkins container for github app authentication

So I am trying to set up our CICD pipeline to authenticate to github via a github app rather than a perosnal user token.

So once I follow the instructions (https://docs.cloudbees.com/docs/cloudbees-ci/latest/cloud-admin-guide/github-app-auth) I run a pipeline and during startup the following error occurs.

ERROR: Error cloning remote repo 'origin'

hudson.plugins.git.GitException: Command "git fetch --no-tags --force --progress -- [email protected]:AusBOM/gridutility.git +refs/heads/master:refs/remotes/origin/master" returned status code 128:

stdout: 

stderr: Failed to add the RSA host key for IP address '20.248.137.48' to the list of known hosts (/home/jenkins/.ssh/known_hosts).

[email protected]: Permission denied (publickey).

fatal: Could not read from remote repository.

The known_hosts file is mounted as a volume from a kubernetes secret on the container we use to run the pipeline. So I have the ability to modify and update this if required and I believe I could do this for a personal access token but not sure how to do this for the github app authentication.

What can I do to fix this so that the github app authentication will work on the box.

Upvotes: 1

Views: 818

Answers (0)

Related Questions