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

blt deploy fails when the git user name and email are not configured #3574

Closed
alexxed opened this issue Apr 24, 2019 · 1 comment · Fixed by #3586
Closed

blt deploy fails when the git user name and email are not configured #3574

alexxed opened this issue Apr 24, 2019 · 1 comment · Fixed by #3586
Labels
Bug Something isn't working
Milestone

Comments

@alexxed
Copy link
Contributor

alexxed commented Apr 24, 2019

Describe the bug

Related to #3511 and #2940.

blt deploy fails without any error details when there's no git user email set.

To Reproduce

Comment out with # user.name and user.email from your ~/.gitconfig
Run blt deploy on a project

Expected behavior
blt deploy works with some dummy git author info, or fails with a specific error message that you have to set that

Detailed error output

› [Acquia\Blt\Robo\Tasks\GitTask] git rm -r --cached --ignore-unmatch --quiet . && git add -A &&
› git -c user.name='BLT dummy user' -c user.email='no-reply@example.com' commit -m 'Deploy
› 1.0.27' --quiet
› [Acquia\Blt\Robo\Tasks\GitTask] Running git rm -r --cached --ignore-unmatch --quiet . &&
› git add -A &&
› git -c user.name='BLT dummy user' -c user.email='no-reply@example.com' commit -m 'Deploy
› 1.0.27' --quiet in /home/acquia/vagrant1/deploy
› [Acquia\Blt\Robo\Tasks\GitTask] Done in 6.932s
› [ExecStack] git tag -a 1.0.27 -m 'Deploy 1.0.27'
› [ExecStack] Running git tag -a 1.0.27 -m 'Deploy 1.0.27' in /home/acquia/vagrant1/deploy
› [ExecStack] Exit code 128 Time 0.004s
› [ExecStack] git tag -a 1.0.27 -m 'Deploy 1.0.27'
› [ExecStack] Running git tag -a 1.0.27 -m 'Deploy 1.0.27'
› [ExecStack] Exit code 128 Time 0.005s
› [ExecStack] git push 33b9c3c2d632f5b516f7b1e11d17d5f3 1.0.27
› [ExecStack] Running git push 33b9c3c2d632f5b516f7b1e11d17d5f3 1.0.27 in
› /home/acquia/vagrant1/deploy
› [ExecStack] Exit code 1 Time 0.004s
› [error] Failed to push deployment artifact!

BLT doctor output
Post the full output of blt doctor in the failing environment here.

System information

  • Operating system type: Linux
  • Operating system version: Fedora 30
  • BLT version: 10.x-dev

Additional context

Note that git tag is reported to failed with exit code 128 but git push continues despite that. That's another problem.

In this case, git tag is failing because no git user, git push is failing because no tag is created.

But the git output is missing, although blt is ran with -vvv.

[acquia@localhost deploy]$ git tag -a 1.0.27 -m 'Deploy 1.0.27'

*** 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.

fatal: unable to auto-detect email address (got 'acquia@localhost.(none)')
[acquia@localhost deploy]$ echo $?
128
[acquia@localhost deploy]$ git push 33b9c3c2d632f5b516f7b1e11d17d5f3 1.0.27
error: src refspec 1.0.27 does not match any
error: failed to push some refs to 'aszaszbltproject1@svn-6061.devcloud.hosting.acquia.com:aszaszbltproject1.git'
[acquia@localhost deploy]$ echo $?
1
@danepowell
Copy link
Contributor

Thanks for the report, I guess no one realized at the time that git tag -a also requires author info. Please test #3586 and let me know if it works for you.

@danepowell danepowell added this to the 10.0.0 milestone Apr 25, 2019
danepowell added a commit that referenced this issue Apr 26, 2019
* Fixes #3574: Git tag needs author info, should stop deploy.

* Code style cleanup

* Code style cleanup
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

Successfully merging a pull request may close this issue.

2 participants