Hi, I’m using Hakyll (specifically a repo forked from dr-hakyll) for my site. I’m using
master as the code branch and
gh-pages for the site itself. I spent a day and a half trying to figure out why my push was failing to authenticate, and I finally figured out that CircleCI was trying to use an https url to push to instead of an ssh url.
When I add a totally useless
git config --global -l right before the other deployment commands, it “fixes” the problem (and displays the config to replace https with ssh). This seems buggy, but is there maybe something I did wrong?
machine: timezone: America/Denver dependencies: cache_directories: - "~/.stack" override: - curl -sSL https://get.haskellstack.org/ | sh - stack setup - stack build --no-system-ghc --install-ghc --only-dependencies test: override: - stack build --no-system-ghc --install-ghc post: - git submodule init - git submodule update - cd _site/ && git checkout gh-pages - stack exec dr-hakyll build deployment: production: branch: master commands: - git config --global -l #<= totally unnecessary, but "fixes" problem? - git config --global user.email circleci@circleci - git config --global user.name CircleCI - cd _site/ && git status - cd _site/ && git add --all - cd _site/ && git commit -m "Update (`date '+%F %T %Z'`) [ci skip]" || true - cd _site/ && git push origin gh-pages - git status - git add _site/ - git commit -m "Update _site (`date '+%F %T %Z'`) [ci skip]" || true - git push origin master
I should note that this circle.yml was cribbed from at least two other people who are using github to host a site. I haven’t done much differently from them.