2017-06-05 137 views
1

我能够添加vcs根目录并在Teamcity中测试连接,连接成功。 但我得到一个Authentiation失败的错误。请指教。npm ERR!远程:无效的用户名或密码

Step 1/1: Install npm packages (Node.js NPM) (3s) 
[00:00:00][Step 1/2] Executing npm via wrapping shell script 
[00:00:00][Step 1/2] Starting: cmd /c npm install 
[00:00:00][Step 1/2] in directory: F:\BuildAgent\work\abc13213 
[00:00:00][Step 1/2] npm install (3s) 
[00:00:00][npm install] npm ERR! git fetch -a origin (https://[email protected]/team/repo.git) remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile. 
[00:00:00][npm install] npm ERR! git fetch -a origin (https://[email protected]/team/repo.git) fatal: Authentication failed for 'https://[email protected]/team/repo.git/'; 
[00:00:00][npm install] npm ERR! Windows_NT 6.3.9600 
[00:00:00][npm install] npm ERR! argv "F:\\nodejs\\node.exe" "C:\\Users\\svc-p-teamcity\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" 
[00:00:00][npm install] npm ERR! node v6.10.2 
[00:00:00][npm install] npm ERR! npm v4.3.0 
[00:00:00][npm install] npm ERR! code 128 
[00:00:00][npm install] 
[00:00:00][npm install] npm ERR! Command failed: git -c core.longpaths=true fetch -a origin 
[00:00:00][npm install] npm ERR! remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile. 
[00:00:00][npm install] npm ERR! fatal: Authentication failed for 'https://[email protected]/team/repo.git/'; 
[00:00:00][npm install] npm ERR! 
[00:00:00][npm install] npm ERR! 
[00:00:00][npm install] npm ERR! If you need help, you may report this error at: 
[00:00:00][npm install] npm ERR!  <https://github.com/npm/npm/issues>; 
[00:00:00][npm install] 
[00:00:00][npm install] npm ERR! Please include the following file with any support request: 
[00:00:00][npm install] npm ERR!  C:\Users\user\AppData\Roaming\npm-cache\_logs\2017-06-05T19_50_00_082Z-debug.log 
[00:00:00][Step 1/2] Process exited with code 1 
[00:00:00][Step 1/2] Step Install npm packages (Node.js NPM) failed 

回答

0

您在TeamCity的配置VCS根,因此在构建开始之前,TeamCity的自动结帐需要库路径到本地机器。

您在原始日志中显示的问题是不同的:npm正尝试连接到bitbucket存储库以安装一些依赖项并因授权失败。

要解决此问题,您必须为Teamcity用户configure SSH keyuser,据我所见可从您的日志中看到)。你可以验证它通过从原来的主机,其中的TeamCity代理位于运行相同的命令工作:

git clone 'https://[email protected]/team/repo.git/' 

否则,你必须改变你依赖的来源:也许你有一个Artifactory的实例的地方,它没有按不需要授权。

相关问题