deployer ignores user's name & email specified in _config.yml deploy/name and deploy/email
I do not have global git user-name & user-email configured, but I do have this in my _config.yml:
deploy:
type: git
repo: [email protected]: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 <[email protected]>
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.
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.
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.
I meet the same situation as you .Here's my solution. If you update
nameand_config.ymllater or you already have.deploy_giton your root, then you should delete.deploy_gitand redeploy it, after that your config changes will take effect.
It works. Nice solution.
I meet the same situation as you .Here's my solution. If you update
nameand_config.ymllater or you already have.deploy_giton your root, then you should delete.deploy_gitand 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.