How to permanently set vault token and url remote server in macos

On Linux I'm setting vault variables to /etc/environment next:

export VAULT_URL='https://some-remote-server.org:8200/'
export VAULT_TOKEN='SoMeToKeN'

But when I'm typeing this in macos, after $> vault status I'm getting Error checking seal status: Get "https://127.0.0.1:8200/v1/sys/seal-status": dial tcp 127.0.0.1:8200: connect: connection refused

What am I doing wrong and how to do it right to get remote access to the vault?


The file /etc/environment is more of a configuration file than a script. Just tell it the variables you want to be set without the export keyword:

VAULT_URL='https://some-remote-server.org:8200/'
VAULT_TOKEN='SoMeToKeN'