我在TeamCity中有一个构建步骤,它正在执行
npm install这是一个Node.js项目。
这是错误的失败:
10:49:37npm错误!git克隆--template=C:\npm-cache_git-remotes_template-镜像git://github.com/ifandelse/ repository .git C:\npm-cache_git-remotes\git-github-com-ifandelse-riveter-git-0cffebb92117c88543cb4359fb9fd69c2d65dd22-e68db054c0bd30b07ce1f9879b4f866f:克隆到裸存储库'C:\npm-cache_git-remotes\git-github-com-ifandelse-riveter-git-0cffebb92117c88543cb4359fb9fd69c2d65dd22-e68db054c0bd30b07ce1f9879b4f866f'...中10:49:37npm错误!git克隆--模板=C:\npm-缓存_git-远程模板--镜像git://github.com/ifandelse/remotes.git C:\npm-cache_git-remotes\git-github-com-ifandelse-riveter-git-0cffebb92117c88543cb4359fb9fd69c2d65dd22-e68db054c0bd30b07ce1f9879b4f866f:致命:无法连接到github.com: 10:49:37 npm错误!git克隆--template=C:\npm-cache_git-remotes_template--镜像git://github.com/ifandelse/ errno=No .git C:\npm-cache_git-remotes\git-github-com-ifandelse-riveter-git-0cffebb92117c88543cb4359fb9fd69c2d65dd22-e68db054c0bd30b07ce1f9879b4f866f: github.com0: 192.30.252.129: errno=No错误10:50:09 npm错误r!Windows_NT 6.1.7601 10:50:09 ERR错误!argv“C:\ Files\nodejs\node.exe”"C:\Program \nodejs\nodejs\node_msvs\npm\bin\npm-cli.js“-msvs_version=2012”10:50:09npm ERR!节点v0.10.33 10:50:09 node错误!npm v3.3.10 10:50:09 npm错误!代码128 10:50:09 128错误!命令失败:克隆到裸存储库'C:\npm-cache_git-remotes\git-github-com-ifandelse-riveter-git-0cffebb92117c88543cb4359fb9fd69c2d65dd22-e68db054c0bd30b07ce1f9879b4f866f'...晚上10:50 9:09错误!致命:无法连接到github.com: 10:50:09npm错误!github.com0: 192.30.252.129: errno=No错误10:50:09 ERR错误!10:50:09 ERR错误!如果您需要帮助,您可以在: 10:50:09npm错误!https://github.com/npm/npm/issues报告此错误;
我可以从命令行运行npm,安装。这就需要“以管理员的身份运行”的想法。
我尝试向TeamCityAgent用户添加管理员角色。
我很确定许可有问题。
发布于 2016-02-25 12:55:38
可能是因为您无法通过ssh或git协议连接到github (可能是因为防火墙或其他原因)。尝试通过https强制git克隆:
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://https://stackoverflow.com/questions/33571039
复制相似问题