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

deployer ignores user's name & email specified in _config.yml deploy/name and deploy/email #112

Closed
desmond-dsouza opened this issue Oct 23, 2018 · 4 comments · Fixed by #353

Comments

@desmond-dsouza
Copy link

desmond-dsouza commented Oct 23, 2018

I do not have global git user-name & user-email configured, but I do have this in my _config.yml:

deploy:
  type: git
  repo: git@github.com:desmond-dsouza/blog.git
  branch: gh-pages
  message: "update blog"
  name: Desmond
  email: <my email>

However, each time I run hexo deploy I get this message:

Committer: desmond <desmond@Air.local>
Your name and email address were configured automatically based
on your username and hostname.

The commit gets done using that incorrect name & email. Is this a bug?

I checked in .deploy_git and its .git/config does not contain any user name or email. It appears like these lines https://github.com/hexojs/hexo-deployer-git/blob/master/lib/deployer.js#L73-L75 are supposed to add those to the .git/config.

@desmond-dsouza
Copy link
Author

Is it true that if the deployer runs once and creates .deploy_git and some initial contents, it will not subsequently process (possibly new) information from _config.yml?

If so, that would explain what happened with me. I did not have the name and email fields set up initially, then when I added them later and they seemed to have no effect.

@Kuro-P
Copy link

Kuro-P commented Dec 2, 2018

I meet the same situation as you .Here's my solution.
If you update name and email in _config.yml later or you already have .deploy_git on your root, then you should delete .deploy_git and redeploy it, after that your config changes will take effect.

@VegetaPn
Copy link

I meet the same situation as you .Here's my solution.
If you update name and email in _config.yml later or you already have .deploy_git on your root, then you should delete .deploy_git and redeploy it, after that your config changes will take effect.

It works. Nice solution.

@shisaru292
Copy link

I meet the same situation as you .Here's my solution.
If you update name and email in _config.yml later or you already have .deploy_git on your root, then you should delete .deploy_git and redeploy it, after that your config changes will take effect.

It works, thanks. By the way, redeployment will overwrite the commits hexo has pushed before.

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

Successfully merging a pull request may close this issue.

4 participants