BVM/Bit Network Configuration

This guide lists the different configuration options that enable you to customize proxy settings and control the network behavior, in Bit and BVM.

Whether you need to route Bit cloud requests through a proxy server, specify local IP addresses, enforce SSL certificate verification, or manage maximum socket limits, this documentation will provide you with the details and practical examples for each configuration option.

The configuration options can be set as key value pairs, using the config set command.

For example, to set Bit with a certificate:

$bit
Copiedcopy
See command synopsis

Similarly, to set BVM with a certificate:

$bvm config set network.ca "-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
Copiedcopy

Run the following to list your current configurations:

$bit
Copiedcopy
See command synopsis

The output is similar to the following:

user.token ep378fa0-5566-4d16-b054-b064c6exx61 network.ca -----BEGIN CERTIFICATE-----XXXX XXXX-----END CERTIFICATE-----

Network configuration options

proxy

This configuration option allows you to specify the HTTP proxy server address. It is used for routing HTTP requests made while executing Bit commands through the proxy server. Once the variable is set, proxy settings will be honored by the underlying request library.

Example: http://proxy.example.com:8080

https_proxy

This configuration option allows you to specify the HTTPS proxy server address. It is used for routing HTTPS requests made while executing Bit commands through the proxy server.

Example: http://proxy.example.com:8080

proxy.ca

This configuration option allows you to specify the certificate authority (CA) for the proxy server. It is used to verify the SSL certificate presented by the proxy server.

Example: /path/to/proxy_ca.pem

proxy.no_proxy

This configuration option allows you to specify a comma-separated list of hostnames or IP addresses that should not be proxied. Requests to these addresses will bypass the configured proxy server.

Example: localhost,127.0.0.1

network.local_address

This configuration option allows you to specify the local IP address to use for network connections. It can be useful in multi-homed environments where you want to explicitly set the source IP address for outgoing connections.

Example: 192.168.1.100

network.max_sockets

This configuration option allows you to specify the maximum number of sockets to use for network connections. It limits the number of concurrent connections that can be established by Bit.

Example: 20

network.ca

This configuration option allows you to specify the CA for verifying SSL certificates presented by remote servers. It is used to establish secure connections with Bit registry servers.

Example: -----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----

network.cafile

This configuration option allows you to specify the path to the CA certificate file to use for SSL connections. It is used to establish secure connections with Bit registry servers.

Example: /path/to/ca_cert.pem

network.strict-ssl

This configuration option allows you to enforce strict SSL certificate verification. If set to true, Bit will validate the SSL certificate presented by remote servers. If set to false, SSL certificate validation will be bypassed.

Example: true

network.cert

This configuration option allows you to specify the path to the client certificate to use for SSL connections. It is used when Bit needs to authenticate itself to a remote server.

Example: /path/to/client_cert.pem

network.key

This configuration option allows you to specify the path to the private key corresponding to the client certificate specified by CFG_NETWORK_CERT. It is used for SSL connections that require client authentication.

Example: /path/to/client_key.pem

Example: Client Certificate Configuration

BVM is Bit's version manager. If you run BVM behind a package registry cache, it's likely that you need to configure BVM network security settings.

  1. Install BVM
$npm i -g @teambit/bvm
Copiedcopy

Refer Bit Version Manager for more information.

  1. Configure Client Certificate with BVM
$bvm config set network.ca "-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
Copiedcopy

Should be in PEM format (Windows calls it Base-64 encoded X.509 (.CER))

  1. Install Bit via BVM
$bvm install
Copiedcopy
  1. Configure Bit to use client certificate
$bit
Copiedcopy
See command synopsis