mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
enter_chroot: copy over ssh configuration
TEST=clean (first) enter_chroot.sh; repo sync The developer instructions for setting up chroot include steps to set up ~/.ssh/config to correctly set up ports and options. And while several attempts are made in enter_chroot to forward ssh-agent and ssh authentication to chroot as well, the ssh config stays outside of chroot, which prevents all attempts to contact the git servers if rw URL is used. This makes a copy of config on entering the chroot, allowing people to use repo from within the chroot. That is not bulletproof and does not reflect changes of config while inside the chroot, but that should be a borderline case. Change-Id: I1fcbf00c413c7af8ef14fc1e846192ac95de106d BUG=n0ne Review URL: http://codereview.chromium.org/6065011
This commit is contained in:
parent
3f898563fb
commit
75805716f5
@ -142,6 +142,7 @@ function setup_env {
|
||||
then
|
||||
mkdir -p "${TARGET_DIR}"
|
||||
cp -r "${HOME}/.ssh/known_hosts" "${TARGET_DIR}"
|
||||
cp -r "${HOME}/.ssh/config" "${TARGET_DIR}"
|
||||
ASOCK="$(dirname "${SSH_AUTH_SOCK}")"
|
||||
mkdir -p "${FLAGS_chroot}/${ASOCK}"
|
||||
sudo mount --bind "${ASOCK}" "${FLAGS_chroot}/${ASOCK}" || \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user