0

在使用lektor将朋友的网页部署到 ghpages 时,我一直在不懈地尝试解决以下问题。然而,我总是收到类似于以下内容的错误:

λ 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!

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

4

1 回答 1

1

看的时候:

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

您可以尝试先将本地存储库中的提交推送到远程。
然后再试一次lektor deploy production

于 2017-02-04T06:18:43.437 回答