lektor: Cannot deploy from Windows box

Hi, I keep getting the following error when deploying from my windows machine to GitHub Pages over HTTPS.

\venv\lib\site-packages\lektor\publisher.py:658: ResourceWarning: unclosed file <_io.BufferedReader name=3> for line in git(['init']).output:

The same setting work for Linux and git works on my windows manchine outside of Lektor as I commit to my own projects.

Any ideas?

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 1
  • Comments: 16 (6 by maintainers)

Most upvoted comments

If Git is executed in Windows Command Prompt or site is deployed from web interface, it may be path delimiter is incorrect for Git, which recognizes it as escaped characters. This can be fixed by replacing \ to \\. Workaround: add replace on line 595 (in def update_git_config()) in publisher.py cred_path = os.path.join(repo, '.git', 'credentials').replace('\\', '\\\\') After doing that, the site is deployed correctly.

The simplest workaround is to use an SSH key instead of a personal access token.