daytonaio / daytona

The Open Source Dev Environment Manager.
https://daytona.io
Apache License 2.0
9.06k stars 797 forks source link

Git config special character parsing #1220

Open idagelic opened 1 week ago

idagelic commented 1 week ago

Describe the bug Steps to reproduce the behavior:

  1. Run the server
  2. Run daytona gp add, choose GitHub and add a token
  3. Run daytona create and select one of your repos
  4. daytona ssh into it and make a change and push it
  5. The change is not shown as the correct username/email, possibly because of the name ending with "ć"

Expected behavior The "idagelic" user should be used, same as the previous commits

Screenshots image

git config --list image

Desktop (please complete the following information):

loveloki commented 1 week ago

This should be a locale problem, can see use localocale.

it output:

LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

Maybe it should be set to C.UTF-8 by default in Dockerfile:

# add this
ENV LANG C.UTF-8
idagelic commented 1 week ago

@loveloki Thanks for the note. Adding the C.UTF-8 lang does solve the displaying issue and I will create a separate issue to take care of the LANG env var in the workspaces.

However, looks like it wasn't the issue as I tried changing the settings for my name to end with "c" instead of "ć" and it didn't help. The real reason was my email address being set to private in the profile settings which thus got fetched as empty. Making it public resolved the issue. I'll keep the issue open for a while as we decide on a way to approach this if there is one.

loveloki commented 1 week ago

@idagelic Ah, I thought it was just a display issue.