[users at bb.net] sshPrivateKey troubles

Trevor Hook trevor.k.hook at googlemail.com
Thu Sep 10 11:32:01 UTC 2020


Hi guys

I'm trying to get buildbot to interact with my bitbucket git repo using an SSH key but I keep getting an 'invalid format' error.

Both master and worker are running in docker containers.

The error message shows a hidden folder which doesn't seem to exist, although given it is holding secrets its conceivable that the location is deliberately deleted at the end of the build jobs.

The error message is:

`Load key "/buildbot/.family_website.build.buildbot/ssh-key": invalid format`

Below is a relevant section of my configuration.

    `steps.Git(
        'git at bitbucket.org:#######.git',
        sshPrivateKey=util.Secret('family_website_v2_pluto'),
        sshKnownHosts=util.Secret('known_hosts'),
        submodules = True,
        mode='incremental'))`

If I change the name of the private file, master won't start suggesting master is finding the key file when configured with the correct filename.

I'm struggling to work out if the worker is getting the private key correctly passed to it, if there is something wrong with my worker container/git installation so that it can't handle SSH keys or if there is something wrong with the SSH key that is causing bitbucket to reject it.

Any suggestions on how to debug this. I guess the first question is should the hidden folder on the worker actually exist once the build job has finished?

Thanks in advanced
Trevor


More information about the users mailing list