Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Using ENV var instructions in Readme Leads to invalid key #10

Open
@byoung

Description

@byoung

Spinning up a key server while following the ENV var setup instructions will lead to an invalid key.

Running this to startup the key server

docker run -e DOCKER-SSH-KEY="$(cat ~/.ssh/id_rsa)" --name=keyserver -d mdsol/docker-ssh-exec -server

Then running any build command with a Dockerfile that contains a git clone of a private repo:

RUN docker-ssh-exec git clone -q 'ssh://[email protected]/mdsol/belker-python.git'

Will lead to this error

Step 9/21 : RUN docker-ssh-exec git clone -q 'ssh://[email protected]/mdsol/belker-python.git'
 ---> Running in d35e5372139e
Broadcasting UDP key request...
Got key from server.
Broadcasting UDP env request...
Recieved env from server
Setting 0 ENV vars from server: 
Writing key to /root/.ssh/id_rsa
Running command: git clone -q ssh://[email protected]/mdsol/belker-python.git
Warning: Permanently added the RSA host key for IP address '140.82.114.4' to the list of known hosts.
Load key "/root/.ssh/id_rsa": invalid format
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

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

Using the first (non ENV var) method to spin up the container does work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions