Closed AllanChain closed 2 years ago
Make sure you are not running gpg-agent
inside the container (only the one on Windows is needed).
Are there any additions to the log when you get the gpg: can't connect to the agent: End of file
error?
Is there any helpful information when you run gpg2
with --debug-level
basic
or advanced
?
There is no additional log printed when running echo test | gpg2 --clearsign --debug-level advanced
Here is the output:
gpg: enabled debug flags: memstat trust extprog
gpg: can't connect to the agent: End of file
gpg: no default secret key: No secret key
gpg: [stdin]: clear-sign failed: No secret key
gpg: keydb: handles=2 locks=0 parse=2 get=2
gpg: build=0 update=0 insert=0 delete=0
gpg: reset=0 found=2 not=1 cache=0 not=0
gpg: kid_not_found_cache: count=0 peak=0 flushes=0
gpg: sig_cache: total=2 cached=0 good=0 bad=0
gpg: random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
outmix=0 getlvl1=0/0 getlvl2=0/0
gpg: rndjent stat: collector=0x0000000000000000 calls=0 bytes=0
gpg: secmem usage: 0/65536 bytes in 0 blocks
I have the same problem. When I first run echo test | gpg2 --clearsign
it says
gpg: can't connect to the agent: End of file
gpg: no default secret key: No secret key
gpg: [stdin]: clear-sign failed: No secret key
But if I try again, it says
gpg: no default secret key: No secret key
gpg: [stdin]: clear-sign failed: No secret key
And of course whenever I commit I get
error: gpg failed to sign the data
fatal: failed to write commit object
In my project gitconfig, I tried both
[gpg]
program = gpg
and
[gpg]
program = gpg2
however nothing changed.
I guess it's a problem with socket forwarding so the second time gpg2 runs, local gpg-agent starts to run?
But whatever the problem is, I cannot sign my commits using devcontainers. Is there any guide on setting up commit signing using devcontainers without gpg4win? Maybe something on my computer is preventing forwarding local gpg agent to containers?
EDIT: I'm able to sign locally without any problems. Problems I mentioned above are for running those commands in the container.
@galtonova What install/version of GPG are you using locally? Could you attach the log (F1
> Remote-Containers: Show Container Log
) from when you are connected to the container and have made a signing attempt?
@chrmarti I didn't install any external gpg software, it's the gpg bundled with windows git. I use Windows 10 and installed git from https://git-scm.com/download/win
. Nothing custom. Only thing I did later was adding C:\Program Files\Git\usr\bin
to my PATH and then in the gitconfig set gpg program to gpg
.
C:\Users\galtonova>git --version
git version 2.34.0.windows.1
C:\Users\galtonova>where gpg
C:\Program Files\Git\usr\bin\gpg.exe
C:\Users\galtonova>gpg-agent
gpg-agent[2253]: gpg-agent running and available
C:\Users\galtonova>gpgconf --list-dir homedir
/c/Users/tolgagerekci/.gnupg
[243 ms] Remote-Containers 0.205.2 in VS Code 1.62.3 (ccbaa2d27e38e5afa3e5c21c1c7bef4657064247).
[242 ms] Start: Resolving Remote
[245 ms] Setting up container for folder or workspace: c:\Users\galtonova\Projects\ChannelManagerFunctions
[246 ms] Start: Check Docker is running
[246 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[436 ms] Server API version: 1.41
[474 ms] Start: Run: git rev-parse --show-cdup
[509 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=c:\Users\galtonova\Projects\ChannelManagerFunctions --filter label=vsch.quality=stable
[732 ms] Start: Run: docker inspect --type container 9ad83b4383b6
[948 ms] Fetching remote container features: Disabled
[953 ms] Start: Inspecting container
[954 ms] Start: Run: docker inspect --type container 9ad83b4383b674ab3213e91f34262016fe7dba90ecd76532226ac1c3d75c5463
[1195 ms] Start: Run in container: /bin/sh
[1203 ms] Start: Run in container: uname -m
[1501 ms] x86_64
[1501 ms]
[1501 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[1502 ms] PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
[1502 ms]
[1503 ms] Start: Run in container: cat /etc/passwd
[1504 ms] Start: Setup shutdown monitor
[1505 ms] Forking shutdown monitor: c:\Users\galtonova\.vscode\extensions\ms-vscode-remote.remote-containers-0.205.2\dist\shutdown\shutdownMonitorProcess \\.\pipe\vscode-remote-containers-06a4becd45a1c65596cb14a6693c99161d2bb9ee-sock singleContainer Debug c:\Users\galtonova\AppData\Roaming\Code\logs\20211122T081516\exthost1\ms-vscode-remote.remote-containers 1637574987764
[1511 ms] Start: Run in container: test -d /home/node/.vscode-server
[1512 ms]
[1513 ms]
[1513 ms] Start: Run in container: test -f /var/vscode-server/.patchEtcEnvironmentMarker
[1514 ms]
[1514 ms]
[1514 ms] Start: Run in container: test -f /var/vscode-server/.patchEtcProfileMarker
[1515 ms]
[1516 ms]
[1516 ms] Start: Run in container: test ! -f '/home/node/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/home/node/.vscode-server/data/Machine' && { > '/home/node/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[1517 ms]
[1517 ms]
[1517 ms] Exit code 1
[1517 ms] Start: Run in container: cat /home/node/.vscode-server/data/Machine/settings.json
[1519 ms]
[1519 ms] cat: /home/node/.vscode-server/data/Machine/settings.json: No such file or directory
[1519 ms] Exit code 1
[1519 ms] Start: Run in container: test -d /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247
[1520 ms]
[1520 ms]
[1520 ms] Start: Run in container: test -d /vscode/vscode-server/bin/linux-x64/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247
[1521 ms]
[1521 ms]
[1521 ms] Start: Run in container: /bin/sh
[1522 ms] Start: Launching Remote-Containers helper.
[1522 ms] ssh-agent: SSH_AUTH_SOCK in container (/tmp/vscode-ssh-auth-28b98de1786d986b6a821312bc43050340914809.sock) forwarded to host (\\.\pipe\openssh-ssh-agent).
[1522 ms] Start: Run: gpgconf --list-dir agent-extra-socket
[1530 ms] Start: Run in container: touch '/vscode/vscode-server/bin/linux-x64/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247'
[1561 ms] /c/Users/galtonova/.gnupg/S.gpg-agent.extra
[1561 ms]
[1561 ms] Start: Run in container: gpgconf --list-dir agent-socket
[1563 ms] /home/node/.gnupg/S.gpg-agent
[1563 ms]
[1563 ms] Start: Run in container: gpgconf --list-dir homedir
[1564 ms] /home/node/.gnupg
[1565 ms]
[1565 ms] Start: Run in container: ls '/home/node/.gnupg/private-keys-v1.d' 2>/dev/null
[1566 ms]
[1566 ms]
[1566 ms] Start: Run in container: mkdir -p -m 700 '/home/node/.gnupg'
[1567 ms] userEnvProbe: loginInteractiveShell (default)
[1567 ms] userEnvProbe shell: /bin/bash
[1567 ms]
[1567 ms]
[1568 ms] Start: Run: gpgconf --list-dir homedir
[1568 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-28b98de1786d986b6a821312bc43050340914809.js' >/tmp/vscode-remote-containers-28b98de1786d986b6a821312bc43050340914809.js
[1569 ms]
[1569 ms]
[1569 ms] Start: Run in container: # Test for /home/node/.ssh/known_hosts and ssh
[1570 ms] /home/node/.ssh/known_hosts exists
[1570 ms]
[1570 ms] Exit code 1
[1570 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-28b98de1786d986b6a821312bc43050340914809.js' >/tmp/vscode-remote-containers-server-28b98de1786d986b6a821312bc43050340914809.js
[1572 ms]
[1572 ms]
[1572 ms] Start: Run in container: /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/node /tmp/vscode-remote-containers-server-28b98de1786d986b6a821312bc43050340914809.js
[1609 ms] /c/Users/galtonova/.gnupg
[1609 ms]
[1610 ms] Start: Run in container: gpgconf --list-dir homedir
[1611 ms] /home/node/.gnupg
[1611 ms]
[1612 ms] Start: Run in container: # Test for /home/node/.gnupg/pubring.kbx and gpg
[1612 ms] /home/node/.gnupg/pubring.kbx exists
[1613 ms]
[1613 ms] Exit code 1
[1613 ms] Start: Run in container: # Test for /home/node/.gnupg/trustdb.gpg and gpg
[1614 ms] /home/node/.gnupg/trustdb.gpg exists
[1614 ms]
[1614 ms] Exit code 1
[1614 ms] Start: Run: gpg-connect-agent updatestartuptty /bye
[1871 ms]
[1871 ms]
[1872 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --system --replace-all credential.helper '!f() { /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/node /tmp/vscode-remote-containers-28b98de1786d986b6a821312bc43050340914809.js $*; }; f' || true
[1873 ms]
[1873 ms]
[1874 ms] Start: Preparing Extensions
[1874 ms] Start: Run in container: test ! -f '/home/node/.vscode-server/data/Machine/.installExtensionsMarker' && set -o noclobber && mkdir -p '/home/node/.vscode-server/data/Machine' && { > '/home/node/.vscode-server/data/Machine/.installExtensionsMarker' ; } 2> /dev/null
[1875 ms]
[1875 ms]
[1875 ms] Exit code 1
[1876 ms] Extensions cache, install extensions: None
[1876 ms] Start: Run in container: test -d /home/node/.vscode-server/extensionsCache && ls /home/node/.vscode-server/extensionsCache || true
[1878 ms] ahgood.shift-shift-0.0.5
dbaeumer.vscode-eslint-2.2.2
dunn.redis-1.4.0
eamodio.gitlens-11.7.0
eg2.vscode-npm-script-0.3.23
esbenp.prettier-vscode-9.0.0
ms-azuretools.vscode-azurefunctions-1.6.0
ms-azuretools.vscode-azureresourcegroups-0.4.0
ms-azuretools.vscode-docker-1.18.0
ms-vscode.azure-account-0.9.11
wraith13.open-in-github-desktop-1.4.2
[1878 ms]
[1878 ms] Start: Run in container: test -d /vscode/vscode-server/extensionsCache && ls /vscode/vscode-server/extensionsCache || true
[1880 ms] ahgood.shift-shift-0.0.5
dbaeumer.vscode-eslint-2.2.2
dunn.redis-1.4.0
eamodio.gitlens-11.7.0
eg2.vscode-npm-script-0.3.23
esbenp.prettier-vscode-9.0.0
ms-azuretools.vscode-azurefunctions-1.6.0
ms-azuretools.vscode-azureresourcegroups-0.4.0
ms-azuretools.vscode-docker-1.18.0
ms-vscode.azure-account-0.9.11
wraith13.open-in-github-desktop-1.4.2
[1880 ms]
[1880 ms] Extensions cache, link in container: None
[1880 ms] Start: Run in container: for pid in `cd /proc && ls -d [0-9]*`; do { echo $pid ; readlink /proc/$pid/cwd ; readlink /proc/$pid/ns/mnt ; cat /proc/$pid/stat | tr "
[1907 ms] Extension host agent is already running.
[1908 ms] Start: Run in container: cat '/home/node/.vscode-server/data/Machine/.devport-ccbaa2d27e38e5afa3e5c21c1c7bef4657064247' 2>/dev/null
[1909 ms] 34771
[1909 ms]
[1909 ms] Port forwarding for container port 34771 starts listening on local port.
[1910 ms] Port forwarding local port 34771 to container port 34771
[1910 ms] Start: Run in container: test ! -f '/home/node/.vscode-server/data/Machine/.onCreateCommandMarker' && set -o noclobber && mkdir -p '/home/node/.vscode-server/data/Machine' && { > '/home/node/.vscode-server/data/Machine/.onCreateCommandMarker' ; } 2> /dev/null
[1911 ms]
[1911 ms]
[1911 ms] Exit code 1
[1912 ms] Start: Run in container: test ! -f '/home/node/.vscode-server/data/Machine/.updateContentCommandMarker' && set -o noclobber && mkdir -p '/home/node/.vscode-server/data/Machine' && { > '/home/node/.vscode-server/data/Machine/.updateContentCommandMarker' ; } 2> /dev/null
[1912 ms]
[1912 ms]
[1913 ms] Exit code 1
[1913 ms] Start: Run in container: test ! -f '/home/node/.vscode-server/data/Machine/.postCreateCommandMarker' && set -o noclobber && mkdir -p '/home/node/.vscode-server/data/Machine' && { > '/home/node/.vscode-server/data/Machine/.postCreateCommandMarker' ; } 2> /dev/null
[1914 ms]
[1914 ms]
[1914 ms] Exit code 1
[1914 ms] Start: Run in container: # Test for /home/node/.gitconfig and git
[1915 ms] /home/node/.gitconfig exists
[1915 ms]
[1915 ms] Exit code 1
[1916 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --global --replace-all credential.helper '!f() { /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/node /tmp/vscode-remote-containers-28b98de1786d986b6a821312bc43050340914809.js $*; }; f' || true
[1917 ms]
[1917 ms]
[1918 ms] Start: Run in container: mkdir -p '/home/node/.vscode-server/data/Machine' && [ "$(cat '/home/node/.vscode-server/data/Machine/.postStartCommandMarker' 2>/dev/null)" != '2021-11-22T09:38:10.483520901Z' ] && echo '2021-11-22T09:38:10.483520901Z' > '/home/node/.vscode-server/data/Machine/.postStartCommandMarker'
[1919 ms]
[1919 ms]
[1919 ms] Exit code 1
[1996 ms] userEnvProbe PATHs:
Probe: '/usr/local/share/npm-global/bin:/usr/local/share/nvm/current/bin:/usr/local/share/npm-global/bin:/usr/local/share/nvm/current/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/node/.local/bin'
Container: '/usr/local/share/npm-global/bin:/usr/local/share/nvm/current/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
[2006 ms] Port forwarding connection from 61829 > 34771 > 34771 in the container.
[2006 ms] Start: Run in container: /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/node -e
[2411 ms] Port forwarding connection from 55029 > 34771 > 34771 in the container.
[2412 ms] Start: Run in container: /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/node -e
[4406 ms] Start: Run in container: cat /proc/5581/environ
@chrmarti Also this is the log of me rebuilding the container and then immediately trying to commit
[237 ms] Remote-Containers 0.205.2 in VS Code 1.62.3 (ccbaa2d27e38e5afa3e5c21c1c7bef4657064247).
[237 ms] Start: Resolving Remote
[240 ms] Setting up container for folder or workspace: c:\Users\galtonova\Projects\ChannelManagerFunctions
[247 ms] Start: Check Docker is running
[247 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[429 ms] Server API version: 1.41
[465 ms] Start: Run: git rev-parse --show-cdup
[498 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=c:\Users\galtonova\Projects\ChannelManagerFunctions --filter label=vsch.quality=stable
[725 ms] Start: Run: docker build -f c:\Users\galtonova\Projects\ChannelManagerFunctions\.devcontainer\Dockerfile -t vsc-channelmanagerfunctions-4293c48c0ec4a25dc7c4d2cabdb5c3f3 --no-cache --pull --build-arg VARIANT=14 c:\Users\galtonova\Projects\ChannelManagerFunctions\.devcontainer
[+] Building 60.5s (8/8) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for mcr.microsoft.com/vscode/devcontainers/typescript-node:0-14 0.6s
=> CACHED [1/4] FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-14@sha256:dd9679b5799f31fd33a73ef9cb78836445f72a345f87e2bb5c5991aa5944a123 0.0s
=> [2/4] RUN apt-get update && apt-get install gnupg2 -y 11.7s
=> [3/4] RUN npm i -g npm@7 5.9s
=> [4/4] RUN cd /tmp && wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make && make install && cp -f src/redis-sentinel /usr/local/bin && mkdir -p /etc/r 42.1s
=> exporting to image 0.2s
=> => exporting layers 0.2s
=> => writing image sha256:cf7f8817e4043063da250987396643a058a00340b4ae390a9e0ae2dda11a2667 0.0s
=> => naming to docker.io/library/vsc-channelmanagerfunctions-4293c48c0ec4a25dc7c4d2cabdb5c3f3 0.0s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[62524 ms] Fetching remote container features: Disabled
[62530 ms] Start: Run: docker inspect --type image vsc-channelmanagerfunctions-4293c48c0ec4a25dc7c4d2cabdb5c3f3
[62834 ms] local container features stored at: c:\Users\galtonova\.vscode\extensions\ms-vscode-remote.remote-containers-0.205.2\dist\node_modules\vscode-dev-containers\container-features
[62835 ms] Start: Run: tar --no-same-owner -x -f -
[62869 ms] Start: Run: docker build -t vsc-channelmanagerfunctions-4293c48c0ec4a25dc7c4d2cabdb5c3f3-features --build-arg BASE_IMAGE=vsc-channelmanagerfunctions-4293c48c0ec4a25dc7c4d2cabdb5c3f3 --build-arg IMAGE_USER=root C:\Users\TOLGAG~1\AppData\Local\Temp\vsch\container-features\0.205.2-1637576560198
[+] Building 112.9s (8/8) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 311B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/vsc-channelmanagerfunctions-4293c48c0ec4a25dc7c4d2cabdb5c3f3:latest 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 236.97kB 0.0s
=> [1/3] FROM docker.io/library/vsc-channelmanagerfunctions-4293c48c0ec4a25dc7c4d2cabdb5c3f3 0.1s
=> [2/3] COPY . /tmp/build-features/ 0.0s
=> [3/3] RUN cd /tmp/build-features/f_microsoft-vscode-dev-container && chmod +x ./install.sh && ./install.sh 112.3s
=> exporting to image 0.5s
=> => exporting layers 0.5s
=> => writing image sha256:6644c6f547c6273a00466ff497bd313e13a0744afa2f9843edfd0b0b4462f703 0.0s
=> => naming to docker.io/library/vsc-channelmanagerfunctions-4293c48c0ec4a25dc7c4d2cabdb5c3f3-features 0.0s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[176953 ms] Start: Run: docker events --format {{json .}} --filter event=start
[176963 ms] Start: Starting container
[176963 ms] Start: Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=c:\Users\galtonova\Projects\ChannelManagerFunctions,target=/workspaces/ChannelManagerFunctions,consistency=cached --mount type=volume,src=vscode,dst=/vscode -l vsch.local.folder=c:\Users\galtonova\Projects\ChannelManagerFunctions -l vsch.quality=stable -l vsch.remote.devPort=0 --entrypoint /bin/sh vsc-channelmanagerfunctions-4293c48c0ec4a25dc7c4d2cabdb5c3f3-features -c echo Container started
[177703 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=c:\Users\galtonova\Projects\ChannelManagerFunctions --filter label=vsch.quality=stable
Container started
[177922 ms] Start: Run: docker inspect --type container adcee2d14ccb
[178137 ms] Start: Inspecting container
[178137 ms] Start: Run: docker inspect --type container adcee2d14ccb62258c504c30c68d9d2cf12e461568fb61d57097452d643003cd
[178353 ms] Start: Run in container: /bin/sh
[178361 ms] Start: Run in container: uname -m
[178700 ms] x86_64
[178701 ms]
[178701 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[178702 ms] PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
[178702 ms]
[178702 ms] Start: Run in container: cat /etc/passwd
[178704 ms] Start: Updating configuration state
[178708 ms] Start: Setup shutdown monitor
[178709 ms] Forking shutdown monitor: c:\Users\galtonova\.vscode\extensions\ms-vscode-remote.remote-containers-0.205.2\dist\shutdown\shutdownMonitorProcess \\.\pipe\vscode-remote-containers-07aa7d8e7c3a5f0d728b25a582ed167de0d7360f-sock singleContainer Debug c:\Users\galtonova\AppData\Roaming\Code\logs\20211122T081516\exthost1\ms-vscode-remote.remote-containers 1637576497675
[178715 ms] Start: Run in container: test -d /home/node/.vscode-server
[178716 ms]
[178716 ms]
[178716 ms] Exit code 1
[178717 ms] Start: Run in container: test -d /home/node/.vscode-remote
[178718 ms]
[178718 ms]
[178718 ms] Exit code 1
[178718 ms] Start: Run in container: test -f /var/vscode-server/.patchEtcEnvironmentMarker
[178719 ms]
[178719 ms]
[178719 ms] Exit code 1
[178720 ms] Start: Run in container: /bin/sh
[178729 ms] Start: Run in container: test ! -f '/var/vscode-server/.patchEtcEnvironmentMarker' && set -o noclobber && mkdir -p '/var/vscode-server' && { > '/var/vscode-server/.patchEtcEnvironmentMarker' ; } 2> /dev/null
[179149 ms]
[179149 ms]
[179150 ms] Start: Run in container: cat >> /etc/environment <<'etcEnvrionmentEOF'
[179151 ms]
[179151 ms]
[179151 ms] Start: Run in container: test -f /var/vscode-server/.patchEtcProfileMarker
[179152 ms]
[179152 ms]
[179152 ms] Exit code 1
[179152 ms] Start: Run in container: test ! -f '/var/vscode-server/.patchEtcProfileMarker' && set -o noclobber && mkdir -p '/var/vscode-server' && { > '/var/vscode-server/.patchEtcProfileMarker' ; } 2> /dev/null
[179153 ms]
[179153 ms]
[179153 ms] Start: Run in container: sed -i -E 's/((^|\s)PATH=)([^\$]*)$/\1${PATH:-\3}/g' /etc/profile || true
[179155 ms]
[179155 ms]
[179155 ms] Start: Run in container: test ! -f '/home/node/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/home/node/.vscode-server/data/Machine' && { > '/home/node/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[179156 ms]
[179156 ms]
[179156 ms] Start: Run in container: cat /home/node/.vscode-server/data/Machine/settings.json
[179157 ms]
[179157 ms] cat: /home/node/.vscode-server/data/Machine/settings.json: No such file or directory
[179157 ms] Exit code 1
[179158 ms] Start: Run in container: test -d /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247
[179159 ms]
[179159 ms]
[179159 ms] Exit code 1
[179159 ms] Start: Run in container: test -d /vscode/vscode-server/bin/linux-x64/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247
[179159 ms]
[179159 ms]
[179160 ms] Start: Run in container: mkdir -p '/home/node/.vscode-server/bin' && ln -snf '/vscode/vscode-server/bin/linux-x64/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247' '/home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247'
[179161 ms]
[179161 ms]
[179161 ms] Start: Run in container: touch '/vscode/vscode-server/bin/linux-x64/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247'
[179161 ms] Start: Launching Remote-Containers helper.
[179161 ms] ssh-agent: SSH_AUTH_SOCK in container (/tmp/vscode-ssh-auth-c2b0dae6a0e550869709207b3db709ed37d29bc4.sock) forwarded to host (\\.\pipe\openssh-ssh-agent).
[179162 ms] Start: Run: gpgconf --list-dir agent-extra-socket
[179162 ms]
[179162 ms]
[179195 ms] /c/Users/galtonova/.gnupg/S.gpg-agent.extra
[179195 ms]
[179195 ms] Start: Run in container: gpgconf --list-dir agent-socket
[179197 ms] /home/node/.gnupg/S.gpg-agent
[179197 ms]
[179197 ms] Start: Run in container: gpgconf --list-dir homedir
[179198 ms] /home/node/.gnupg
[179198 ms]
[179198 ms] Start: Run in container: ls '/home/node/.gnupg/private-keys-v1.d' 2>/dev/null
[179199 ms]
[179200 ms]
[179200 ms] Exit code 2
[179200 ms] Start: Run in container: mkdir -p -m 700 '/home/node/.gnupg'
[179200 ms] userEnvProbe: loginInteractiveShell (default)
[179201 ms] userEnvProbe shell: /bin/bash
[179201 ms]
[179201 ms]
[179201 ms] Start: Run: gpgconf --list-dir homedir
[179201 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-c2b0dae6a0e550869709207b3db709ed37d29bc4.js' >/tmp/vscode-remote-containers-c2b0dae6a0e550869709207b3db709ed37d29bc4.js
[179202 ms]
[179202 ms]
[179202 ms] Start: Run in container: # Test for /home/node/.ssh/known_hosts and ssh
[179204 ms]
[179204 ms]
[179204 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-c2b0dae6a0e550869709207b3db709ed37d29bc4.js' >/tmp/vscode-remote-containers-server-c2b0dae6a0e550869709207b3db709ed37d29bc4.js
[179205 ms]
[179205 ms]
[179206 ms] Start: Run in container: # Copy C:\Users\galtonova\.ssh\known_hosts to /home/node/.ssh/known_hosts
[179206 ms] Start: Run in container: /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/node /tmp/vscode-remote-containers-server-c2b0dae6a0e550869709207b3db709ed37d29bc4.js
[179207 ms]
[179207 ms]
[179207 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --system --replace-all credential.helper '!f() { /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/node /tmp/vscode-remote-containers-c2b0dae6a0e550869709207b3db709ed37d29bc4.js $*; }; f' || true
[179209 ms]
[179209 ms]
[179209 ms] Start: Preparing Extensions
[179209 ms] Start: Run in container: test ! -f '/home/node/.vscode-server/data/Machine/.installExtensionsMarker' && set -o noclobber && mkdir -p '/home/node/.vscode-server/data/Machine' && { > '/home/node/.vscode-server/data/Machine/.installExtensionsMarker' ; } 2> /dev/null
[179211 ms]
[179211 ms]
[179212 ms] Extensions cache, install extensions: ms-vscode.azure-account, ms-azuretools.vscode-azurefunctions, ahgood.shift-shift, dbaeumer.vscode-eslint, esbenp.prettier-vscode, ms-azuretools.vscode-docker, eg2.vscode-npm-script, eamodio.gitlens
[179212 ms] Start: Run in container: test -d /home/node/.vscode-server/extensionsCache && ls /home/node/.vscode-server/extensionsCache || true
[179213 ms]
[179213 ms]
[179213 ms] Start: Run in container: test -d /vscode/vscode-server/extensionsCache && ls /vscode/vscode-server/extensionsCache || true
[179215 ms] ahgood.shift-shift-0.0.5
dbaeumer.vscode-eslint-2.2.2
dunn.redis-1.4.0
eamodio.gitlens-11.7.0
eg2.vscode-npm-script-0.3.23
esbenp.prettier-vscode-9.0.0
ms-azuretools.vscode-azurefunctions-1.6.0
ms-azuretools.vscode-azureresourcegroups-0.4.0
ms-azuretools.vscode-docker-1.18.0
ms-vscode.azure-account-0.9.11
wraith13.open-in-github-desktop-1.4.2
[179215 ms]
[179215 ms] Extensions cache, link in container: ahgood.shift-shift-0.0.5, dbaeumer.vscode-eslint-2.2.2, eamodio.gitlens-11.7.0, eg2.vscode-npm-script-0.3.23, esbenp.prettier-vscode-9.0.0, ms-azuretools.vscode-azurefunctions-1.6.0, ms-azuretools.vscode-docker-1.18.0, ms-vscode.azure-account-0.9.11
[179215 ms] Start: Run in container: mkdir -p '/home/node/.vscode-server/extensionsCache' && ln -s '/vscode/vscode-server/extensionsCache'/* '/home/node/.vscode-server/extensionsCache' || true
[179217 ms]
[179217 ms]
[179217 ms] Start: Run in container: cd /vscode/vscode-server/extensionsCache && touch 'ahgood.shift-shift-0.0.5' 'dbaeumer.vscode-eslint-2.2.2' 'eamodio.gitlens-11.7.0' 'eg2.vscode-npm-script-0.3.23' 'esbenp.prettier-vscode-9.0.0' 'ms-azuretools.vscode-azurefunctions-1.6.0' 'ms-azuretools.vscode-docker-1.18.0' 'ms-vscode.azure-account-0.9.11'
[179218 ms] Start: Run in container: for pid in `cd /proc && ls -d [0-9]*`; do { echo $pid ; readlink /proc/$pid/cwd ; readlink /proc/$pid/ns/mnt ; cat /proc/$pid/stat | tr "
[179222 ms]
[179222 ms]
[179232 ms] Start: Starting VS Code Server
[179232 ms] Start: Run in container: /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/server.sh --log debug --force-disable-user-env --use-host-proxy --port 0 --extensions-download-dir /home/node/.vscode-server/extensionsCache --install-extension ms-vscode.azure-account --install-extension ms-azuretools.vscode-azurefunctions --install-extension ahgood.shift-shift --install-extension dbaeumer.vscode-eslint --install-extension esbenp.prettier-vscode --install-extension ms-azuretools.vscode-docker --install-extension eg2.vscode-npm-script --install-extension eamodio.gitlens --start-server --disable-websocket-compression
[179248 ms] /c/Users/galtonova/.gnupg
[179248 ms]
[179248 ms] Start: Run in container: gpgconf --list-dir homedir
[179250 ms] /home/node/.gnupg
[179250 ms]
[179250 ms] Start: Run in container: # Test for /home/node/.gnupg/pubring.kbx and gpg
[179251 ms]
[179252 ms]
[179252 ms] Start: Run in container: # Copy c:\Users\galtonova\.gnupg\pubring.kbx to /home/node/.gnupg/pubring.kbx
[179253 ms]
[179253 ms]
[179253 ms] Start: Run in container: # Test for /home/node/.gnupg/trustdb.gpg and gpg
[179255 ms]
[179255 ms]
[179255 ms] Start: Run in container: # Copy c:\Users\galtonova\.gnupg\trustdb.gpg to /home/node/.gnupg/trustdb.gpg
[179256 ms]
[179256 ms]
[179256 ms] Start: Run: gpg-connect-agent updatestartuptty /bye
[179589 ms]
*
* Visual Studio Code Server
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license https://aka.ms/vscode-remote/license
*
Extension host agent listening on 43311
[179589 ms] Start: Run in container: echo 43311 >'/home/node/.vscode-server/data/Machine/.devport-ccbaa2d27e38e5afa3e5c21c1c7bef4657064247'
[179590 ms]
[179590 ms]
[179590 ms] Port forwarding for container port 43311 starts listening on local port.
[179591 ms] Port forwarding local port 43311 to container port 43311
[179591 ms] Start: Run in container: test ! -f '/home/node/.vscode-server/data/Machine/.onCreateCommandMarker' && set -o noclobber && mkdir -p '/home/node/.vscode-server/data/Machine' && { > '/home/node/.vscode-server/data/Machine/.onCreateCommandMarker' ; } 2> /dev/null
[179593 ms]
[179593 ms]
[179593 ms] Start: Run in container: test ! -f '/home/node/.vscode-server/data/Machine/.updateContentCommandMarker' && set -o noclobber && mkdir -p '/home/node/.vscode-server/data/Machine' && { > '/home/node/.vscode-server/data/Machine/.updateContentCommandMarker' ; } 2> /dev/null
[179594 ms]
[179594 ms]
[179595 ms] Start: Run in container: test ! -f '/home/node/.vscode-server/data/Machine/.postCreateCommandMarker' && set -o noclobber && mkdir -p '/home/node/.vscode-server/data/Machine' && { > '/home/node/.vscode-server/data/Machine/.postCreateCommandMarker' ; } 2> /dev/null
[179596 ms]
[179596 ms]
[179596 ms] Start: Run in container: # Test for /home/node/.gitconfig and git
[179597 ms]
[179598 ms]
[179598 ms] Start: Run in container: # Copy C:\Users\galtonova\.gitconfig to /home/node/.gitconfig
[179599 ms]
[179600 ms]
[179600 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --global --replace-all credential.helper '!f() { /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/node /tmp/vscode-remote-containers-c2b0dae6a0e550869709207b3db709ed37d29bc4.js $*; }; f' || true
[179602 ms]
[179602 ms]
[179602 ms] Start: Run in container: mkdir -p '/home/node/.vscode-server/data/Machine' && [ "$(cat '/home/node/.vscode-server/data/Machine/.postStartCommandMarker' 2>/dev/null)" != '2021-11-22T10:24:36.793319571Z' ] && echo '2021-11-22T10:24:36.793319571Z' > '/home/node/.vscode-server/data/Machine/.postStartCommandMarker'
[179603 ms] userEnvProbe PATHs:
Probe: '/usr/local/share/npm-global/bin:/usr/local/share/nvm/current/bin:/usr/local/share/npm-global/bin:/usr/local/share/nvm/current/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/node/.local/bin'
Container: '/usr/local/share/npm-global/bin:/usr/local/share/nvm/current/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
[179607 ms]
[179607 ms]
Running the postStartCommand from devcontainer.json...
[179607 ms] Start: Run in container: /bin/sh -c sudo redis-server /etc/redis/redis.conf && sudo chown -R node:node ./
[179681 ms] Port forwarding connection from 51749 > 43311 > 43311 in the container.
[179681 ms] Start: Run in container: /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/node -e
[179692 ms] [10:24:38] Extension host agent started.
[179726 ms] Installing extensions...
[180152 ms] [10:24:39] [::ffff:127.0.0.1][64401fb2][ManagementConnection] New connection established.
[180156 ms] Port forwarding connection from 51034 > 43311 > 43311 in the container.
[180156 ms] Start: Run in container: /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/node -e
[180529 ms] Installing extension 'ms-vscode.azure-account'...
[180536 ms] Installing extension 'ahgood.shift-shift'...
[180537 ms] Installing extension 'dbaeumer.vscode-eslint'...
[180542 ms] Installing extension 'ms-azuretools.vscode-azurefunctions'...
[180579 ms] Installing extension 'eg2.vscode-npm-script'...
[180583 ms] Installing extension 'ms-azuretools.vscode-docker'...
[180588 ms] Installing extension 'esbenp.prettier-vscode'...
[180707 ms] Installing extension 'eamodio.gitlens'...
[180927 ms] [10:24:40] Installing extension: eg2.vscode-npm-script
[180938 ms] [10:24:40] Installing extension: esbenp.prettier-vscode
[180957 ms] [10:24:40] Installing extension: dbaeumer.vscode-eslint
[180958 ms] [10:24:40] Installing extension: ahgood.shift-shift
[180961 ms] [10:24:40] Installing extension: ms-vscode.azure-account
[180979 ms] [10:24:40] Installing extension: ms-azuretools.vscode-azurefunctions
[181036 ms] [10:24:40] Installing extension: ms-azuretools.vscode-docker
[181084 ms] [10:24:40] Installing extension: eamodio.gitlens
[181495 ms] [10:24:40] Downloaded extension: eg2.vscode-npm-script /home/node/.vscode-server/extensionsCache/eg2.vscode-npm-script-0.3.23
[181503 ms] [10:24:40] [::ffff:127.0.0.1][651f56f1][ExtensionHostConnection] New connection established.
[181512 ms] [10:24:40] [::ffff:127.0.0.1][651f56f1][ExtensionHostConnection] <312> Launched Extension Host Process.
[181533 ms] [10:24:40] Downloaded extension: esbenp.prettier-vscode /home/node/.vscode-server/extensionsCache/esbenp.prettier-vscode-9.0.0
[181566 ms] [10:24:40] Downloaded extension: dbaeumer.vscode-eslint /home/node/.vscode-server/extensionsCache/dbaeumer.vscode-eslint-2.2.2
[181566 ms] [10:24:40] Downloaded extension: ahgood.shift-shift /home/node/.vscode-server/extensionsCache/ahgood.shift-shift-0.0.5
[181567 ms] [10:24:40] Downloaded extension: ms-vscode.azure-account /home/node/.vscode-server/extensionsCache/ms-vscode.azure-account-0.9.11
[181584 ms] [10:24:40] Downloaded extension: eamodio.gitlens /home/node/.vscode-server/extensionsCache/eamodio.gitlens-11.7.0
[181637 ms] [10:24:40] Extracted extension to /home/node/.vscode-server/extensions/.d5b9c4b6-c6fd-4bf0-8506-590d334e614b: ahgood.shift-shift
[181652 ms] [10:24:40] Renamed to /home/node/.vscode-server/extensions/ahgood.shift-shift-0.0.5
[181657 ms] [10:24:40] Extracting completed. ahgood.shift-shift
[181657 ms] [10:24:40] Extension installed successfully: ahgood.shift-shift
[181658 ms] Extension 'ahgood.shift-shift' v0.0.5 was successfully installed.
[181861 ms] [10:24:40] Extracted extension to /home/node/.vscode-server/extensions/.5734ba58-c638-4eed-9e0c-e894a8eb9c15: eg2.vscode-npm-script
[181883 ms] [10:24:40] Renamed to /home/node/.vscode-server/extensions/eg2.vscode-npm-script-0.3.23
[181894 ms] [10:24:40] Extracting completed. eg2.vscode-npm-script
[181894 ms] [10:24:40] Extension installed successfully: eg2.vscode-npm-script
[181894 ms] Extension 'eg2.vscode-npm-script' v0.3.23 was successfully installed.
[181907 ms] [10:24:41] Extracted extension to /home/node/.vscode-server/extensions/.8cb1973b-d9c2-4d01-84c4-45bbdc0b3753: ms-vscode.azure-account
[181914 ms] [10:24:41] Renamed to /home/node/.vscode-server/extensions/ms-vscode.azure-account-0.9.11
[181917 ms] [10:24:41] Extracting completed. ms-vscode.azure-account
[181918 ms] [10:24:41] Extension installed successfully: ms-vscode.azure-account
[181918 ms] Extension 'ms-vscode.azure-account' v0.9.11 was successfully installed.
[181971 ms] [10:24:41] Installing extension: ms-azuretools.vscode-azureresourcegroups
[182002 ms] [10:24:41] Downloaded extension: ms-azuretools.vscode-azureresourcegroups /home/node/.vscode-server/extensionsCache/ms-azuretools.vscode-azureresourcegroups-0.4.0
[182112 ms] [10:24:41] Downloaded extension: ms-azuretools.vscode-docker /home/node/.vscode-server/extensionsCache/ms-azuretools.vscode-docker-1.18.0
[182326 ms] [10:24:41] Extracted extension to /home/node/.vscode-server/extensions/.d6638dfa-26ab-44d8-b2c3-7e5d7dba4ad1: ms-azuretools.vscode-azureresourcegroups
[182339 ms] [10:24:41] Renamed to /home/node/.vscode-server/extensions/ms-azuretools.vscode-azureresourcegroups-0.4.0
[182341 ms] [10:24:41] Extracting completed. ms-azuretools.vscode-azureresourcegroups
[182372 ms] [10:24:41] Downloaded extension: ms-azuretools.vscode-azurefunctions /home/node/.vscode-server/extensionsCache/ms-azuretools.vscode-azurefunctions-1.6.0
[182512 ms] [10:24:41] Extracted extension to /home/node/.vscode-server/extensions/.241fc74f-626f-4aa6-99de-e3974de9c08c: ms-azuretools.vscode-docker
[182529 ms] [10:24:41] Renamed to /home/node/.vscode-server/extensions/ms-azuretools.vscode-docker-1.18.0
[182533 ms] [10:24:41] Extracting completed. ms-azuretools.vscode-docker
[182533 ms] [10:24:41] Extension installed successfully: ms-azuretools.vscode-docker
[182534 ms] Extension 'ms-azuretools.vscode-docker' v1.18.0 was successfully installed.
[182661 ms] Port forwarding connection from 59506 > 43311 > 43311 in the container.
[182661 ms] Start: Run in container: /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/node -e
[182823 ms] [10:24:41] Extracted extension to /home/node/.vscode-server/extensions/.21e6c889-514c-41b3-a602-cb6aa7a200fa: eamodio.gitlens
[182849 ms] [10:24:41] Renamed to /home/node/.vscode-server/extensions/eamodio.gitlens-11.7.0
[182854 ms] [10:24:41] Extracting completed. eamodio.gitlens
[182854 ms] [10:24:41] Extension installed successfully: eamodio.gitlens
[182856 ms] Extension 'eamodio.gitlens' v11.7.0 was successfully installed.
[182930 ms] [10:24:42] Extracted extension to /home/node/.vscode-server/extensions/.6c47d5a7-8e09-488c-a135-6eede85308ab: dbaeumer.vscode-eslint
[182937 ms] [10:24:42] Renamed to /home/node/.vscode-server/extensions/dbaeumer.vscode-eslint-2.2.2
[182938 ms] [10:24:42] Extracting completed. dbaeumer.vscode-eslint
[182939 ms] [10:24:42] Extension installed successfully: dbaeumer.vscode-eslint
Extension 'dbaeumer.vscode-eslint' v2.2.2 was successfully installed.
[182963 ms] [10:24:42] Extracted extension to /home/node/.vscode-server/extensions/.466e9ee5-73ee-48cc-b3df-b5ccb8af42c9: esbenp.prettier-vscode
[182968 ms] [10:24:42] Renamed to /home/node/.vscode-server/extensions/esbenp.prettier-vscode-9.0.0
[182969 ms] [10:24:42] Extracting completed. esbenp.prettier-vscode
[182970 ms] [10:24:42] Extension installed successfully: esbenp.prettier-vscode
[182970 ms] Extension 'esbenp.prettier-vscode' v9.0.0 was successfully installed.
[183164 ms] [10:24:42] Extracted extension to /home/node/.vscode-server/extensions/.646a062b-b8f3-4db6-b0da-e9ba455590d4: ms-azuretools.vscode-azurefunctions
[183169 ms] [10:24:42] Renamed to /home/node/.vscode-server/extensions/ms-azuretools.vscode-azurefunctions-1.6.0
[183170 ms] [10:24:42] Extracting completed. ms-azuretools.vscode-azurefunctions
[183171 ms] [10:24:42] Extension installed successfully: ms-azuretools.vscode-azureresourcegroups
[10:24:42] Extension installed successfully: ms-azuretools.vscode-azurefunctions
[183171 ms] Extension 'ms-azuretools.vscode-azurefunctions' v1.6.0 was successfully installed.
[188503 ms] Port forwarding 59506 > 43311 > 43311 stderr: Remote close
[188529 ms] Port forwarding 59506 > 43311 > 43311 terminated with code 0 and signal null.
[308534 ms] Port forwarding 59506 > 43311 > 43311: Local close with error
[1459587 ms] Port forwarding connection from 56761 > 43311 > 43311 in the container.
[1459587 ms] Start: Run in container: /home/node/.vscode-server/bin/ccbaa2d27e38e5afa3e5c21c1c7bef4657064247/node -e
[1465367 ms] Port forwarding 56761 > 43311 > 43311 stderr: Remote close
[1465396 ms] Port forwarding 56761 > 43311 > 43311 terminated with code 0 and signal null.
[1473709 ms] Port forwarding 56761 > 43311 > 43311: Local close
[1459587 ms]
and later logs are from when I went to version control tab in the vscode and clicked the commit button.
And this is the git command output:
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
error: gpg failed to sign the data
fatal: failed to write commit object
And my Dockerfile (but the problem was present before I added redis install command to my Dockerfile):
ARG VARIANT="16-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
RUN apt-get update && apt-get install gnupg2 -y
RUN npm i -g npm@7
RUN \
cd /tmp && \
wget http://download.redis.io/redis-stable.tar.gz && \
tar xvzf redis-stable.tar.gz && \
cd redis-stable && \
make && \
make install && \
cp -f src/redis-sentinel /usr/local/bin && \
mkdir -p /etc/redis && \
cp -f *.conf /etc/redis && \
rm -rf /tmp/redis-stable* && \
sed -i 's/^\(bind .*\)$/# \1/' /etc/redis/redis.conf && \
sed -i 's/^\(daemonize .*\)$/# \1/' /etc/redis/redis.conf && \
sed -i 's/^\(dir .*\)$/# \1\ndir \/data/' /etc/redis/redis.conf && \
sed -i 's/^\(logfile .*\)$/# \1/' /etc/redis/redis.conf && \
echo 'daemonize yes' >> /etc/redis/redis.conf
VOLUME ["/data"]
And finally the devcontainer.json
{
"name": "Node.js & TypeScript",
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "14"
}
},
"settings": {},
"extensions": [
"ms-vscode.azure-account",
"ms-azuretools.vscode-azurefunctions",
"ahgood.shift-shift",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"ms-azuretools.vscode-docker",
"eg2.vscode-npm-script",
"eamodio.gitlens"
],
"forwardPorts": [6379],
"postStartCommand": "sudo redis-server /etc/redis/redis.conf && sudo chown -R node:node ./",
"remoteUser": "node",
"features": {
"git": "latest",
"git-lfs": "latest"
}
}
I have the exact same problem, it is still not working for me.
How do I make sure that gpg-agent
is not running inside the container?
You can kill gpg-agent
by running gpgconf --kill gpg-agent
.
However, it still does not work for me:
node ➜ /workspace (main ✗) $ gpgconf --kill gpg-agent
node ➜ /workspace (main ✗) $ echo test | gpg2 --clearsign
gpg: no default secret key: No secret key
gpg: [stdin]: clear-sign failed: No secret key
(base) PS C:\Users\mitch\Desktop> gpgconf --list-dir homedir
c:\users\mitch\.gnupg
gpgconf: Warning: homedir taken from registry key (Software\GNU\GnuPG HomeDir)
I have tried gpgconf --kill gpg-agent
but, I think that the gpg-agent
daemon gets re-started every time gpg
is called, if it is not currently running.
Make sure the container's ~/.gnupg
folder is empty, we don't overwrite any files in there and that might explain why you don't see any keys. If that doesn't help, please append the log from a Remote-Containers session (F1
> Remote-Containers: Show Container Log
.)
Realizing that you have the gpg-agent running in the container: Make sure you don't start that, it is usually started from a shell startup script in your home folder in the container (e.g., ~/.profile
).
Make sure the container's
~/.gnupg
folder is empty, we don't overwrite any files in there and that might explain why you don't see any keys. If that doesn't help, please append the log from a Remote-Containers session (F1
>Remote-Containers: Show Container Log
.)
The directory ~/.gnupg
contained the following files:
S.gpg-agent
S.gpg-agent.browser
S.gpg-agent.extra
S.gpg-agent.ssh
private-keys-v1.d
pubring.kbx
trustdb.gpg
I deleted all of them but pubring.kbx
gets recreated after a short while.
Realizing that you have the gpg-agent running in the container: Make sure you don't start that, it is usually started from a shell startup script in your home folder in the container (e.g.,
~/.profile
).
This is the content of ~/.profile
:
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
mesg n || true
To me it seems like this is the default start-up script. I am sorry but I am not sure where else I should look.
@AlbertoFabbri93 Could you rebuild the container and append the log from that? That will tell us if the pubring.kbx and trustdb.gpg files already were in the container image. You would have to remove them for us to copy your local files over. (@galtonova 's rebuild log shows that the files are copied over as required.)
Also check other config files in the container if they start the gpg-agent, e.g.: grep -i gpg ~/.*
It looks like pubring.kbx
and trustdb.gpg
get copied over.
This is what I get if I execute grep -i gpg ~/.*
:
grep: /root/.: Is a directory
grep: /root/..: Is a directory
grep: /root/.cache: Is a directory
/root/.gitconfig: gpgsign = true
/root/.gitconfig: # gpgsign = true
grep: /root/.gnupg: Is a directory
grep: /root/.ssh: Is a directory
grep: /root/.vscode-server: Is a directory
To me everything looks fine, I tried a few other variations of the above command but I didn't see anything unusual. Do you have any other idea?
@AlbertoFabbri93 Could you append your devcontainer.json and Dockerfile (and docker-compose.yml if you use one)?
Using:
# The FROM instruction specifies the Parent Image from which you are building
FROM python:3.9-slim-buster
# Avoid error while installing python packages and clear apt cache
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
gnupg2 \
python3-dev \
ssh-client \
graphviz \
&& rm -rf /var/lib/apt/lists/*
I get a dev container with:
root@c0852832510a:~# ls -la .gnupg/
total 340
drwx------ 2 root root 4096 Feb 11 07:20 .
drwx------ 1 root root 4096 Feb 11 07:20 ..
srwxr-xr-x 1 root root 0 Feb 11 07:20 S.gpg-agent
-rw-r--r-- 1 root root 332112 Feb 11 07:20 pubring.kbx
-rw-r--r-- 1 root root 1280 Feb 11 07:20 trustdb.gpg
And no gpg-agent running. If the gpg-agent is started in the container, it takes over without having the private keys available.
The suggested test seems to work:
root@c0852832510a:~# echo test | gpg2 --clearsign
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
test
Do you have a dotfiles repository configured in your user settings?
I tried echo test | gpg2 --clearsign
but it does not work.
I am not entirely sure what do you want to know with your last question... do you mean if I save all my configuration dotfiles inside a git repo?
Do you have any news?
You can configure a dotfiles repository in your VS Code user settings which could affect the outcome here.
Have you tried using the above Dockerfile? With this: Is the gpg-agent running inside the container? (It should not.)
You can configure a dotfiles repository in your VS Code user settings which could affect the outcome here.
No, I have not done that.
Have you tried using the above Dockerfile? With this: Is the gpg-agent running inside the container? (It should not.)
With the above Dockerfile the behaviour is exactly the same as usual.
If I type pgrep gpg-agent
before trying to commit with git I get nothing.
If I try to commit I get the usual gpg error and if I then execute pgrep gpg-agent
I get the ID of that process.
If I kill the gpg-agent it is re-started every time I try to commit with git.
Does echo test | gpg2 --clearsign
work on your local machine?
Could you:
ls -la ~/.gnupg/
in the container and post its output here.echo test | gpg2 --clearsign
in the container and post its output here.F1
> Remote-Containers: Show Container Log
)Log level setting:
Does
echo test | gpg2 --clearsign
work on your local machine?
No, only echo test | gpg --clearsign
works.
Could you:
- Set Remote-Containers log level to 'trace' in the user settings.
✔
- Rebuild the container (using the above Dockerfile) to start from scratch.
✔
- Run
ls -la ~/.gnupg/
in the container and post its output here.
root@1ee27b7746af:/workspaces/test# ls -la ~/.gnupg/
total 16
drwx------ 2 root root 4096 Feb 23 17:27 .
drwx------ 1 root root 4096 Feb 23 17:27 ..
srwxr-xr-x 1 root root 0 Feb 23 17:27 S.gpg-agent
-rw-r--r-- 1 root root 2498 Feb 23 17:27 pubring.kbx
-rw-r--r-- 1 root root 1280 Feb 23 17:27 trustdb.gpg
- Run
echo test | gpg2 --clearsign
in the container and post its output here.
root@1ee27b7746af:/workspaces/test# echo test | gpg2 --clearsign
gpg: can't connect to the agent: End of file
gpg: no default secret key: No secret key
gpg: [stdin]: clear-sign failed: No secret key
root@1ee27b7746af:/workspaces/test# echo test | gpg --clearsign
gpg: no default secret key: No secret key
gpg: [stdin]: clear-sign failed: No secret key
- Post the log output here. (
F1
>Remote-Containers: Show Container Log
)Log level setting:
Thanks, this all looks like it should work - except it doesn't. What do you get when running gpg --version
locally?
gpg --version
gpg (GnuPG) 2.2.29-unknown
libgcrypt 1.9.3-unknown
Copyright (C) 2021 Free Software Foundation, Inc.
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /c/Users/albif/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
Hey @chrmarti, this issue might need further attention.
@AllanChain, you can help us out by closing this issue if the problem no longer exists, or adding more information.
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!
@AlbertoFabbri93 Looking at Home: /c/Users/albif/.gnupg
, do you know why it is not using C:\
for the path? Is this Cygwin?
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!
@AlbertoFabbri93 Looking at
Home: /c/Users/albif/.gnupg
, do you know why it is not usingC:\
for the path? Is this Cygwin?
I do not know, I am not using Cygwin. I am using the gpg executable that comes with git for Windows. I am not using Gpg4win.
Expand to see logs
``` [563 ms] Remote-Containers 0.194.0 in VS Code 1.60.2 (7f6ab5485bbc008386c4386d08766667e155244e). [562 ms] Start: Resolving Remote [572 ms] Start: Check Docker is running [572 ms] Start: Run: docker version --format {{.Server.APIVersion}} [1139 ms] Server API version: 1.41 [1143 ms] Start: Run: docker volume ls -q [1721 ms] Start: Run: docker ps -q -a --filter label=vsch.local.repository=https://github.com/Microsoft/vscode-remote-try-node --filter label=vsch.local.repository.volume=vscode-remote-try-node-6789fd329eb29bc56aab44eb27506206 --filter label=vsch.local.repository.folder=vscode-remote-try-node --filter label=vsch.quality=stable [2294 ms] Start: Run: docker inspect --type container a8e11fc2da74 [2845 ms] Start: Starting container [2845 ms] Start: Run: docker start a8e11fc2da74d36abd0fce5d1e3856088b8e9fc5f8e41d15bef8d34d25324ede [3807 ms] Start: Run: docker ps -q -a --filter label=vsch.local.repository=https://github.com/Microsoft/vscode-remote-try-node --filter label=vsch.local.repository.volume=vscode-remote-try-node-6789fd329eb29bc56aab44eb27506206 --filter label=vsch.local.repository.folder=vscode-remote-try-node --filter label=vsch.quality=stable [4319 ms] Start: Run: docker inspect --type container a8e11fc2da74 [4907 ms] Start: Run in container: /bin/sh [4949 ms] Start: Run in container: cat /workspaces/vscode-remote-try-node/.devcontainer/devcontainer.json 2>/dev/null [5548 ms] Start: Inspecting container [5549 ms] Start: Run: docker inspect --type container a8e11fc2da74d36abd0fce5d1e3856088b8e9fc5f8e41d15bef8d34d25324ede [6069 ms] Start: Run in container: /bin/sh [6113 ms] Start: Run in container: uname -m [6704 ms] x86_64 [6704 ms] [6705 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null [6710 ms] PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" [6710 ms] [6711 ms] Start: Run in container: cat /etc/passwd [6717 ms] Start: Setup shutdown monitor [6719 ms] Forking shutdown monitor: c:\Users\AC\.vscode\extensions\ms-vscode-remote.remote-containers-0.194.0\dist\shutdown\shutdownMonitorProcess \\.\pipe\vscode-remote-containers-de3d230d7d1aad7924ff4834ab8bdb8860386ae1-sock singleContainer Debug c:\Users\AC\AppData\Roaming\Code\logs\20210928T183757\exthost1\ms-vscode-remote.remote-containers 1632825479966 [6745 ms] Start: Run in container: cat /workspaces/vscode-remote-try-node/.devcontainer/Dockerfile [6752 ms] # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/javascript-node/.devcontainer/base.Dockerfile # [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster ARG VARIANT=16-bullseye FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} # [Optional] Uncomment this section to install additional OS packages. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # && apt-get -y install --no-install-recommendsSteps to Reproduce:
echo test | gpg2 --clearsign
in container terminal ResultRerun after
gpg-agent
List gpg keys:
Git config:
Other info:
Does this issue occur when you try this locally?: No Does this issue occur when you try this locally and all extensions are disabled?: No
I think it's the same as #4478. It was marked as March milestone but the problem is not solved.