如何使用" ghpages + https"进行部署windows上的lektor方法?得到太阳炮错误:

时间:2017-02-04 01:55:19

标签: windows github deployment lektor

在使用lektor为朋友部署网页时,我一直在不遗余力地尝试解决以下问题。然而,我总是得到类似于:

的错误
λ lektor deploy production
Deploying to production
  Build cache: C:\Users\user\AppData\Roaming\Lektor\Cache\builds\6edf4ce4c35ce53180e6c7f3b6a081ae
  Target: ghpages+https://user/user.github.io
  Initialized empty Git repository in C:/Users/user/repos/repo/temp/.deploytempswkcet/scratch/.git/
  Fetching origin
  fatal: Couldn't find remote ref refs/heads/master
  error: Could not fetch origin
  warning: LF will be replaced by CRLF in about/index.html.
  The file will have its original line endings in your working directory.
  warning: LF will be replaced by CRLF in blog/first-post/index.html.
  The file will have its original line endings in your working directory.
  warning: LF will be replaced by CRLF in blog/index.html.
  The file will have its original line endings in your working directory.
  warning: LF will be replaced by CRLF in index.html.
  The file will have its original line endings in your working directory.
  warning: LF will be replaced by CRLF in projects/index.html.
  The file will have its original line endings in your working directory.
  bash: /dev/tty: No such device or address
  error: failed to execute prompt script (exit code 1)
  fatal: could not read Username for 'https://github.com': Invalid argument
Done!

我的配置目前设置如下:

[project]
name = repo

[servers.production]
target = ghpages+https://user/user.github.io
user = user
password = pass

解决此问题的另一种尝试是输入以下内容:

lektor deplot --username user --password password production

呈现以下结果:

Deploying to production
  Build cache: C:\Users\Aperez\AppData\Roaming\Lektor\Cache\builds\6edf4ce4c35ce53180e6c7f3b6a081ae
  Target: ghpages+https://johnmanruz/johnmanruz.github.io
  Initialized empty Git repository in C:/Users/Aperez/repos/profejohnruz/temp/.deploytempcvsfya/scratch/.git/
  fatal: bad config line 12 in file .git/config
  fatal: bad config line 12 in file .git/config
  fatal: bad config line 12 in file .git/config
  fatal: bad config line 12 in file .git/config
Done!

如果我的设置有问题,请告诉我。

1 个答案:

答案 0 :(得分:1)

查看:

Fetching origin
  fatal: Couldn't find remote ref refs/heads/master

您可以尝试先将本地仓库的提交推送到您的遥控器 然后再试一次lektor deploy production