在Visual Studio Team Services中,我尝试在构建解决方案之前在托管构建服务器上运行npm install。但是我们拒绝访问我们的https://our_url.visualstudio.com/GIT:
npm ERR! git clone --template = C:\ NPM \ Cache_git-remotes_templates --mirror https://our_url.visualstudio.com/GIT/_git/our_url-gulp-bundle-helper C:\ NPM \ Cache_git,遥控器\的git-HTTPS的our_url-的VisualStudio-COM-GIT-混帐our_url-一饮而尽束辅助-2-2-7-88eb446d: 克隆到裸存储库 ' C:\ NPM \ Cache_git-遥控\ GIT中-HTTPS的our_url-的VisualStudio-COM-GIT-GIT-our_url-吞束辅助-2-2-7-88eb446d' ...
npm ERR! git clone --template = C:\ NPM \ Cache_git-remotes_templates --mirror https://our_url.visualstudio.com/GIT/_git/our_url-gulp-bundle-helper C:\ NPM \ Cache_git,遥控器\的git-HTTPS的our_url-的VisualStudio-COM-GIT-混帐our_url-一饮而尽束辅助-2-2-7-88eb446d: 致命:遇到InvalidOperationException。
npm ERR! git clone --template = C:\ NPM \ Cache_git-remotes_templates --mirror https://our_url.visualstudio.com/GIT/_git/our_url-gulp-bundle-helper C:\ NPM \ Cache_git,遥控器\的git-HTTPS的our_url-的VisualStudio-COM-GIT-混帐our_url-一饮而尽束辅助-2-2-7-88eb446d: 致命:身份验证失败 ' https://our_url.visualstudio.com/GIT/_git/our_url-gulp-bundle-helper/'
npm ERR! git clone --template = C:\ NPM \ Cache_git-remotes_templates --mirror https://our_url.visualstudio.com/GIT/_git/our_url-gulp-bundle-helper C:\ NPM \ Cache_git,遥控器\的git-HTTPS的our_url-的VisualStudio-COM-GIT-混帐our_url-一饮而尽束辅助-2-2-7-88eb446d: 致命:身份验证失败 ' https://our_url.visualstudio.com/GIT/_git/our_url-gulp-bundle-helper/'
看起来我们的访问被拒绝,我认为我正在通过进入GIT并添加' 项目集合构建服务帐户'对团队的权限,但似乎没有做到这一点。知道我需要做些什么来让托管构建服务器拥有我们的GIT服务器的权限吗?
答案 0 :(得分:0)
需要设置我的personal access token并通过我的package.json传递它:
"my_package": git+https://my-name%40my-domain.com:[TOKEN]@my_url.visualstudio.com/GIT/_git/my_package#2.2.7