From 75805716f50e15abfe15f9f2a5056b863e59298b Mon Sep 17 00:00:00 2001 From: Zdenek Behan Date: Wed, 5 Jan 2011 00:56:32 +0100 Subject: [PATCH] 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 --- enter_chroot.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/enter_chroot.sh b/enter_chroot.sh index bc06ddfc4a..29ef561291 100755 --- a/enter_chroot.sh +++ b/enter_chroot.sh @@ -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}" || \