2

I am able to add the vcs root and test the connection in Teamcity, the connection is successful. But I'm getting an Authentiation failed error. Please advice.

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://git@bitbucket.org/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://git@bitbucket.org/team/repo.git) fatal: Authentication failed for 'https://git@bitbucket.org/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://git@bitbucket.org/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
John Miller
  • 513
  • 2
  • 8
  • 23

1 Answers1

-1

You configured VCS root in the Teamcity, so before the build starts, Teamcity will automatically checkout required repository paths to the local machine.

The problem you showed in the original log is different: npm is trying to connect to bitbucket repository to install some dependencies and fails, because authorization.

To solve this issue, you have to configure SSH key for Teamcity user (user as far as I can see from your log). You can verify that it works via running the same command from the original host, where Teamcity agent sits:

git clone 'https://git@bitbucket.org/team/repo.git/'

Otherwise, you have to change the source of your dependencies: maybe you have an Artifactory instance somewhere, which doesn't require authorisation.

grundic
  • 4,641
  • 3
  • 31
  • 47
  • I have configured SSH correctly, I am able to clone the repo, which its trying to connect. Still facing error. – Amit Oct 23 '20 at 11:43