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

Missing user.name, user.email causes BLT to effectively fail silently but show success #2940

Closed
wizonesolutions opened this issue Jul 11, 2018 · 4 comments
Labels
Bug Something isn't working

Comments

@wizonesolutions
Copy link

My system information:

  • Operating system type: Ubuntu
  • Operating system version: 18.04
  • BLT version: 8.9.10

Output of blt doctor:

Attempting to run doctor on host machine...
[warning] Unable to run the doctor using alias '@'. Trying with '@self'...
[error]  Unable to execute the `blt doctor` command.

When I run this command:

blt deploy

I get the following output:

Client work; can't paste it. But if I cd deploy (the deployment directory) and git status, I see many files ready to be committed, but not committed. If I type git commit, I see:

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

And I expected this to happen:

I would have expected the build to fail, since git commit would have likely returned a non-zero exit code. Properly configuring commit credentials did indeed restore expected behavior. I ran into this when I set up a build server in order to be able to push BLT artifacts more quickly (my residential upload was quite slow).

@ba66e77 ba66e77 added the 8.9.x label Jul 11, 2018
@ba66e77
Copy link
Contributor

ba66e77 commented Jul 11, 2018

This seems like a similar issue to what we saw in #53. I agree, though, that it should have thrown some kind of error rather than failing quietly.

May or may not be germane, but the output of blt doctor seems to indicate something else is also going on with your setup.

And I get that you've got client work that needs to be sanitized, but it would be very helpful to see even a sanitized output from blt deploy -vvv

@wizonesolutions
Copy link
Author

@ba66e77 Yeah, not sure what's going on with blt doctor. deploy itself works fine. The build machine is pretty clean, but maybe I'm missing a particular dependency that doctor expects but doesn't actually break anything. Or I have a version of Drush that it doesn't expect. I dunno.

@ba66e77 ba66e77 added the Bug Something isn't working label Jul 12, 2018
@crittermike
Copy link

FWIW, I have the same issue (missing git user and email) when running inside throw-away docker containers, and for me it DOES cause the artifact:deploy job to fail with an error code.

@danepowell
Copy link
Contributor

danepowell commented Mar 13, 2019

I can't reproduce this in BLT 10.x using DrupalVM and Git 2.7.4, which has no git username or email set by default. If you can provide steps to reproduce under these conditions please reopen.

I think later versions of Git automatically configure a username and email address if it's not set, so this should no longer be an issue unless you are using an old version of Git, which I'm not sure we can support.

Additionally, BLT allows you to pass git.user.name and git.user.email as configuration to work around this:

if ($this->getConfig()->has("git.user.name") &&

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants