我们刚刚开始了一个新项目,并试图通过 Appveyor 让 CI 工作。它是一个Aurelia
Web 应用程序,因此我们需要jspm
在构建服务器上。
在我的工作站上,我按照@guybedford 在下面的回答中的建议手动配置了 jspm,并在 appveyor.yml 脚本中配置了我的 authtoken:
- jspm config registries.github.auth %JSPM_GITHUB_AUTH_TOKEN%
目前我的 appveyor.yml 看起来像这样,基于JSPM 的自动配置部分
version: 1.0.{build}
os: Visual Studio 2015
build:
verbosity: detailed
environment:
JSPM_GITHUB_AUTH_TOKEN:#token from jspm registry export github (locally)#
install:
- ps: Set-Culture nl-NL
- ps: Install-Product node $env:nodejs_version
- cd src\Web
- npm uninstall jspm -g
- npm install -g jspm
- npm install -g gulp
- npm install
- jspm config registries.github.auth %JSPM_GITHUB_AUTH_TOKEN%
- jspm config registries.github.maxRepoSize 0
- jspm registry export github #output to see what the registry looks like
- jspm install -y
- gulp build
- cd ..\..
nuget:
account_feed: true
before_build:
- dnvm install -r clr -arch x86 1.0.0-rc1-update1
- dnu restore
- nuget restore
该jspm install - y
命令失败并出现错误: Unauthorized response for GitHub API
。
如何在 AppVeyor 上使用 JSPM 正确配置 Github 凭据?