openbmc-build-scripts icon indicating copy to clipboard operation
openbmc-build-scripts copied to clipboard

run-unit-test-docker.sh: Enable SSH support

Open ewalkusx opened this issue 1 year ago • 1 comments

There is a need to clone repository via SSH. When I run script with EXTRA_DOCKER_RUN_ARGS="-v /home/user/.gitconfig:/home/user/.gitconfig -v /home/user/.ssh:/home/user/.ssh", I have this error message:

/bin/sh: 1: exec: socat: not found
Connection closed by UNKNOWN port 65535
fatal: Could not read from remote repository.

Can I add some EXTRA_DOCKER_RUN_ARGS to install socat?

ewalkusx avatar May 10 '24 16:05 ewalkusx

Can I add some EXTRA_DOCKER_RUN_ARGS to install socat?

We can add socat to the container directly if it is necessary for running git-over-ssh? But ... what is socat being used for in this context? I don't have socat installed on my development box and use git-over-ssh all the time.

I do see some code in build-setup.sh that is leveraging socat for HTTP proxying, but that's slightly surprising to me because git also has the http.proxy config option.

williamspatrick avatar May 10 '24 16:05 williamspatrick

Hi @williamspatrick, Thank you for your quick response. We are using socat in the SSH configuration according to our company guide. Could you please add socat to the container?

ewalkusx avatar May 13 '24 09:05 ewalkusx

@ewalkusx Is this something you can contribute (via Gerrit). It sounds like you have more context on what the utility of this is.

https://github.com/openbmc/openbmc-build-scripts/blob/88dd792924df8d1173404f83ecda7ccf6fa6af38/scripts/build-unit-test-docker#L825

williamspatrick avatar May 13 '24 12:05 williamspatrick