来自Appveyor的GitHub API未经授权的回应 [英] Unauthorized response from GitHub API on Appveyor

查看:318
本文介绍了来自Appveyor的GitHub API未经授权的回应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们刚刚开始一个新项目,并试图通过Appveyor获得CI工作。
它是一个 Aurelia web应用程序,所以我们需要在构建服务器上使用 jspm

在我的工作站上,我手动配置jspm ,如@guybedford在他的回答中所建议的那样,并在appveyor.yml脚本中配置我的authtoken:

   -  jspm config registries.github.auth%JSPM_GITHUB_AUTH_TOKEN%

目前我的appveyor.yml是这样的,基于 JSPM自动配置部分

 版本:1.0。{build} 
:Visual Studio 2015
uild:
详细程度:详细
环境:
JSPM_GITHUB_AUTH_TOKEN:#从jspm注册表中导出出口github(本地)#
install:
- ps:Set-Culture nl-NL
- ps:安装 - 产品节点$ env:nodejs_version
- cd src\Web
- npm卸载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注册表导出github #output查看注册表的样子
- 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恢复

jspm install - y 命令失败出现错误: GitHub API未经授权的响应

如何使用AppVeyor上的JSPM正确配置Github凭证?

解决方案

与Appveyor团队联系后,我们发现节点版本是问题。
安装Node的稳定版本就像一个魅力:

  ps:安装 - 产品节点稳定


We just started with a new project and trying to get CI working via Appveyor. It is an Aurelia web application so we need jspm on the build server.

On my workstation I configured jspm manually as suggested by @guybedford in his answer below and configured my authtoken in appveyor.yml script:

  - jspm config registries.github.auth %JSPM_GITHUB_AUTH_TOKEN%

Currently my appveyor.yml looks like this, based on the Auto configuring section from 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

The jspm install - y command fails with the error: Unauthorized response for GitHub API.

How do I configure Github credentials properly with JSPM on AppVeyor?

解决方案

After contact with the Appveyor team we figured oud that the node version was the problem. Installing the stable version of Node works like a charm:

ps: Install-Product node stable

这篇关于来自Appveyor的GitHub API未经授权的回应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆