-
Notifications
You must be signed in to change notification settings - Fork 28
Description
If you use Git to commit inside the Vagrant box, you end-up with a commit signed by "Vagrant User" instead of your name/email configured in your host git config.
Reproduction Steps:
- Create a blank box with the role Git
- Commit something inside the box:
git commit -m "Test" --allow-empty - The commit is signed by "Vagrant User" with a generated email depending on the project name
Expected behavior:
The commit should be signed with the same config as my host Git config.
Observed behavior:
The role git seems to correctly set the config in the guest at /etc/gitconfig. However, another git config is created at ~/.gitconfig. I tried to delete this file but everytime I run a git command, this file gets recreated with an empty "name" and "email" field. I was able to make it work by removing the empty "name" and "email" fields from the ~/.gitconfig file. It then fallback to the /etc/gitconfig values which are the expected ones.
Drifter version: 1.4.0
Vagrant version: 1.9.5
OS and version: MacOS 10.12.6
Additional information:
- Problem started happening recently, didn't happen in an older version of Drifter: I think so, it might comes from a new version of Git or differences in the base boxes
- Problem can be reliably reproduced, doesn't happen randomly: Yes
- Problem happens to my colleagues aswell or only me: Yes