Skip to content
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

Git config is weirdly synchronized between host and guest #199

Open
LeBenLeBen opened this issue Oct 6, 2017 · 1 comment
Open

Git config is weirdly synchronized between host and guest #199

LeBenLeBen opened this issue Oct 6, 2017 · 1 comment

Comments

@LeBenLeBen
Copy link
Contributor

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:

  1. Create a blank box with the role Git
  2. Commit something inside the box: git commit -m "Test" --allow-empty
  3. 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
@sephii
Copy link

sephii commented Feb 24, 2018

Ok this nearly killed me but I finally found out the problem doesn't come from the provisioning, but from the base boxes themselves, and more specifically the way we build them. I filed an issue on the drifter-base-boxes repository.

I'll keep this issue open until the problem is fixed upstream and post any updates here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants