Environment variables not picked up by ClI

I tried to run a Postman collection via CLI. From what I found on internet CLI works only with collections in workspace that are pushed to postman cloud, not locally? Am I correct? (Resolved)

I had my environment variables set locally, but they seemed not picked up. Then I tried to sync the environments to postman cloud. The envs synced, but their values remained empty. Is that a correct behaviour? (Still in question)

Additinally my collection request chain only fails in PostmanCli, but works well with collection runner. (Resolved below)

Hey @adam-cimoch-d8f487b0 :waving_hand:

Welcome to the Postman Community! :postman:

Postman CLI lets you run both cloud as well as local collections. You can specify the environment (local / cloud) as well and the variables will be resolved during the run execution.

For more details, check out the documentation : Collection commands | Postman Docs

Also, the AI support at Postman documentation overview | Postman Docs can greatly assist you in learning more about features.

Let us know if you still face any blocker with environment resolution / locally running the collection.

@spaceflight-physicis

Hi There, thank you for your help.

I think I found the core issue to my problem. I need to present MTLS certificate during handshake. However I am not sure how to attach it to my request. It works by default in postman desktop app by adding it in settings.

Is there a way to do it on CLI level? My certificate is not picked up and the handshake fails. (Solved by ssl parameters)

https://learning.postman.com/docs/postman-cli/postman-cli-collections

I would also like to know whether locally set values in environment variables are pushed to cloud. Seems like not to me, but it might be an issue.