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 author and committer environment variables are not respected during gh-deploy #1383

Closed
danielhoherd opened this issue Jan 17, 2018 · 4 comments

Comments

@danielhoherd
Copy link

The following git environment variables do not appear to be respected by mkdocs when running mkdocs gh-deploy:

  • GIT_AUTHOR_NAME
  • GIT_AUTHOR_EMAIL
  • GIT_COMMITTER_NAME
  • GIT_COMMITTER_EMAIL

Probably more are not respected, but these are the ones I observed in my own environment after switching from ~/.gitconfig to environment variables. When I re-enabled these configurations in ~/.gitconfig and ran a test mkdocs gh-deploy the commit information was available in the new commit.

@waylan
Copy link
Member

waylan commented Jan 17, 2018

Our gh-deploy script is a light wrapper around ghp-import. Does that script exhibit the same behavior?

I would say this is an upstream issue, but we use a locally vendored fork, so we need to update our own copy to match upstream. Please report this upstream, and leave a comment here pointing to the upstream issue. If/when this is addressed upstream, we'll merge the fix here.

As an aside, there are some corner cases were our wrapper doesn't work (see #1291). In those situations using ghp-import directly is the only workable solution at this time. The down side is that you don't get to store the config values for the script in the mkdocs.yml config file. They need to be passed in on the command line instead.

@danielhoherd
Copy link
Author

I've checked the behavior of ghp-import and found that the bug is there. I'll file this bug with them. Thanks for the guidance @waylan.

@waylan
Copy link
Member

waylan commented Feb 6, 2018

As a side note, we would likely need to support ghp-import's -s flag (use shell). But according to c-w/ghp-import#63, that appears to be buggy. We'll review this if/when ghp-import is updated.

@waylan waylan added this to the 1.0.0 milestone Feb 6, 2018
@waylan waylan modified the milestones: 1.0.0, Post 1.0 Jul 5, 2018
@waylan
Copy link
Member

waylan commented Nov 9, 2020

Just noted that this was fixed upstream in version 0.6.0. We will likely get the change when we follow through with #2170.

waylan added a commit to waylan/mkdocs that referenced this issue Dec 21, 2020
waylan added a commit to waylan/mkdocs that referenced this issue Dec 21, 2020
@waylan waylan modified the milestones: Post 1.0, 1.2 Dec 21, 2020
waylan added a commit to waylan/mkdocs that referenced this issue Dec 21, 2020
@waylan waylan closed this as completed in 5c2b4f1 Dec 21, 2020
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