diff mbox series

Adds vscode devcontainer support

Message ID 29acfeb3-246f-4ddf-8701-a5ee6d7affaf@schnelte.de
State New
Headers show
Series Adds vscode devcontainer support | expand

Commit Message

Matthias Schnelte Sept. 11, 2023, 2:13 p.m. UTC
Visual studio code is injecting a git credential helper
into every dev container. This helper is forwarding the git credentials
from the host into the container.

In order for this helper to work the REMOTE_CONTAINERS_IPC
needs to be available in the environment for all git operations
that require authentication.
---
  lib/bb/fetch2/__init__.py | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Richard Purdie Sept. 13, 2023, 9:51 p.m. UTC | #1
On Mon, 2023-09-11 at 16:13 +0200, Matthias Schnelte wrote:
> Visual studio code is injecting a git credential helper
> into every dev container. This helper is forwarding the git credentials
> from the host into the container.
> 
> In order for this helper to work the REMOTE_CONTAINERS_IPC
> needs to be available in the environment for all git operations
> that require authentication.
> ---
>   lib/bb/fetch2/__init__.py | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
> index 765aedd5..552a0939 100644
> --- a/lib/bb/fetch2/__init__.py
> +++ b/lib/bb/fetch2/__init__.py
> @@ -874,7 +874,8 @@ FETCH_EXPORT_VARS = ['HOME', 'PATH',
>                        'AWS_SECRET_ACCESS_KEY',
>                        'AWS_DEFAULT_REGION',
>                        'GIT_CACHE_PATH',
> -                     'SSL_CERT_DIR']
> +                     'SSL_CERT_DIR',
> +                     'REMOTE_CONTAINERS_IPC']
> 
>   def get_fetcher_environment(d):
>       newenv = {}

This patch is missing a Signed-off-by line and the patch itself is also
has damaged whitespace (note the multiple spaces in front of def
get_fetcher_environment) so can't be applied unfortunately.

Cheers,

Richard
diff mbox series

Patch

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 765aedd5..552a0939 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -874,7 +874,8 @@  FETCH_EXPORT_VARS = ['HOME', 'PATH',
                       'AWS_SECRET_ACCESS_KEY',
                       'AWS_DEFAULT_REGION',
                       'GIT_CACHE_PATH',
-                     'SSL_CERT_DIR']
+                     'SSL_CERT_DIR',
+                     'REMOTE_CONTAINERS_IPC']

  def get_fetcher_environment(d):
      newenv = {}