-
-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply host git config with ddev auth ssh #1459
Comments
Related bash config ideas: #926 - We probably need to try for a more general approach that allows various home directory files to be configured into the web container. |
But I'm not sure if #926 is a good solution for this, as the host gitconfig file might contain other configs which should not go into the container, especially for Windows hosts (e. g. different core.filemode settings on Windows and Linux) |
Yeah, in #926 I was thinking about a special config that would be mounted as bash_profile or bashrc, not actually mount the exact config. bash configs have the exact same problem you mention. |
I didn't want to commit a .gitconfig file with a specific user's name and email configuration. I found the following suggestion on the In-container Configuration page:
This still didn't solve the problem the way the OP mentioned, but it gave me an idea. Now that I remembered the global DDEV config, I realized a great solution is to add a symlink from ln -s ~/.gitconfig ~/.ddev/homeadditions/.gitconfig |
Thanks @mbomb007, I found a solution but already forgot this issue. That symlinks work is new for me and back when I created this issue the homeadditions feature didn't exists, so the only way would be an overridden Dockerfile which copies files into the images and that was sth. I don't want to do. But copying (or symlinking) files in the host file system into a place where DDEV can use them for a specific project is fine. I created a script
In addition I create a
and a
As you can see, I also copy the composer |
Is your feature request related to a problem? Please describe.
ddev auth ssh
is a really helpful feature. But commits created inside the container always haveDDEV-Local User <nobody@example.com>
as author. This is good as a default but doesn't make much sense in active project development.Describe the solution you'd like
When
ddev auth ssh
is executed, check if the host OS has a global configuration for user.name and user.email (git config --global --get user.name
,git config --global --get user.email
) and set those values globally inside the container.Describe alternatives you've considered
There are no good alternatives as the difficulty lies within fetching the host config and transporting them into the containers.
The text was updated successfully, but these errors were encountered: