loft-sh / devpod

Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker.
https://devpod.sh
Mozilla Public License 2.0
8.63k stars 318 forks source link

I get this error after trying to create a workspace : error Error configuring git credentials: add git credential helper: exit status 255 #1174

Open MihaiValentinGeorgescu opened 1 month ago

MihaiValentinGeorgescu commented 1 month ago

I get this error after trying to open a Workspace. error Error configuring git credentials: add git credential helper: exit status 255

This is the Dockerfile I have:

ARG DOCKER_REGISTRY= ARG OS_VERSION=focal-20210609 FROM ${DOCKER_REGISTRY}ubuntu:${OS_VERSION}

ENV PYTHONUNBUFFERED=1 ENV TZ=Europe/Berlin

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ && echo $TZ > /etc/timezone \ && apt-get update \ && apt-get install --no-install-recommends -y \ git \ openssh-client \ curl \ && apt-get clean \ && rm -rf /var/lib/apt/lists/*

Configure Git user information

RUN git config --global user.name "someuser" \ && git config --global user.email "someemail" \ && git config --global credential.helper 'cache --timeout=86400'

Copy SSH keys and set permissions (adjust the path to your SSH keys)

COPY id_rsa /root/.ssh/id_rsa COPY id_rsa.pub /root/.ssh/id_rsa.pub RUN chmod 600 /root/.ssh/id_rsa \ && ssh-keyscan github.com >> /root/.ssh/known_hosts

ARG UID=1001 ARG GID=1001 ARG USERNAME=local RUN groupadd ${USERNAME} --gid ${GID} \ && useradd ${USERNAME} --create-home --no-user-group --no-log-init --system --uid ${UID} --gid ${GID} --shell /bin/bash \ && echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

RUN mkdir /cache/ \ && chown ${UID}:${GID} /cache/ \ && chown ${UID}:${GID} /usr/local/ -R \ && chown ${UID}:${GID} /var/ -R \ && chown ${UID}:${GID} /var/run/ -R

RUN mkdir /var/run/devpod \ && chown ${UID}:${GID} /var/run/devpod -R

USER ${UID}

ENV GOBIN=/usr/local/go/bin ENV PATH=${GOBIN}:${PATH}

ENV TF_PLUGIN_CACHE_DIR="/cache/.terraform.d/plugin-cache"

and this is the command i am using:

devpod up --debug --id devpod-v5 --provider kubernetes git@github.somerepo

I don't know how to fix this error.

pascalbreuninger commented 1 month ago

Hi @MihaiValentinGeorgescu, thanks for opening the issue. Can you provide more details about your setup and format the dockerfile (wrap with ```) please?

  1. Your operating system
  2. Your DevPod Version
  3. Your devcontainer.json file
MihaiValentinGeorgescu commented 1 month ago

@pascalbreuninger

  1. I have windows 11
  2. devpod version 0.5.15
  3. i do not have a devcontainer.json file I saw that in some cases i need such a file but i didn't quite understand why