使用Travis CI将Lektor站点部署到Github页面时出错

问题描述:

我有一个Lektor站点,我尝试使用Travis CI trigger approach from the Lektor docs自动响应请求和提交进行部署。使用Travis CI将Lektor站点部署到Github页面时出错

Lektor配置从命令行工作正常。

特拉维斯建设启动,并出现建立的网站没有问题 - 但是当它到达的部署,日志说以下内容:

Installing deploy dependencies 
!!! Script support is experimental !!! 

Preparing deploy 
Cleaning up git repository with `git stash --all`. If you need build artifacts for deployment, set `deploy.skip_cleanup: true`. See https://docs.travis-ci.com/user/deployment/#Uploading-Files. 
No local changes to save 

Deploying application 
Deploying to ghpages-https 
    Build cache: /home/travis/.cache/lektor/builds/d3a411e13041731555222b901cff4248 
    Target: ghpages+https://pybee/pybee.github.io?cname=pybee.org 
    Initialized empty Git repository in /home/travis/build/pybee/pybee.github.io/temp/.deploytemp9xhRDc/scratch/.git/ 
    Fetching origin 
    fatal: repository 'https://github.com/pybee/pybee.github.io/' not found 
    error: Could not fetch origin 
    fatal: repository 'https://github.com/pybee/pybee.github.io/' not found 
Done! 

对于一个完整的日志,see here

我已经在存储库的Travis CI配置中检查了凭据;我尽可能确定他们是正确的。我试过使用相同的配置(本地导出LEKTOR_DEPLOY_USERNAMELEKTOR_DEPLOY_PASSWORD),并且它工作正常。

hammer:pybee.org rkm$ lektor deploy ghpages-https 
Deploying to ghpages-https 
    Build cache: /Users/rkm/Library/Caches/Lektor/builds/a269cf944d4302f15f78a1dfb1602486 
    Target: ghpages+https://pybee/pybee.github.io?cname=pybee.org 
    Initialized empty Git repository in /Users/rkm/projects/beeware/pybee.org/temp/.deploytempOh4p98/scratch/.git/ 
    Fetching origin 
    From https://github.com/pybee/pybee.github.io 
    * [new branch]  master  -> origin/master 
    On branch master 
    Your branch is up-to-date with 'origin/master'. 
    nothing to commit, working directory clean 
    Everything up-to-date 
Done! 

有关此错误原因的任何建议吗?

+0

也许尝试使用GitHub回购个人访问令牌?正如[Lektor文档](https://www.getlektor.com/docs/deployment/travisci/#access-credentials)中提到的那样,因为它似乎与GitHub的身份验证是失败的地方。 或者,也许看看您是否可以增加部署命令的调试信息量。 – ocean

+0

我在日志中发现的唯一区别是/在Travis回购结束时,有没有可能这是您配置中的拼写错误? – akalipetis

原来这是一个bug in Lektor

如果您使用您<project>.lektorproject如下:

[servers.ghpages-https] 
target = ghpages+https://pybee/pybee.github.io?cname=pybee.org 

,并在下面的.travis.yml

language: python 
python: 2.7 
cache: 
    directories: 
    - $HOME/.cache/pip 
    - $HOME/.cache/lektor/builds 
install: "pip install git+https://github.com/singingwolfboy/[email protected]#egg=lektor" 
script: "lektor build" 
deploy: 
    provider: script 
    script: "lektor deploy ghpages-https" 
    on: 
    branch: lektor 

(即用于部署的PR分支),建立预期将部署。

+0

如果现在合并修复链接的问题得到解决,请考虑“接受”您自己的答案。 – kmonsoor