2017-06-05 89 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的實例的地方,它沒有按不需要授權。

相關問題