Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

newman CLI returns "error: unable to get local issuer certificate" in teamcity build

Using the newman nodeJS CLI to run a collection of postman test I get the following error:

error: unable to get local issuer certificate

It is run as part of a Teamcity CI build using the following command:

newman run https://www.getpostman.com/collections/<COLLECTION-ID-HERE>

It is run on windows and we have a corporate proxy server (ZScaler).

How to I get newman to work?

like image 846
alastairtree Avatar asked Oct 25 '25 22:10

alastairtree


1 Answers

Just add --insecure in front of collectionID i.e :

newman run https://www.getpostman.com/collections/?apiKey="your-Postman-Api-Key" --insecure

Also When triggering the execution using a json file, Just add --insecure So your command shall be :

newman run .postman_collection.json --insecure

like image 56
Chetan Yeshi Avatar answered Oct 27 '25 18:10

Chetan Yeshi