Configuring proxies
If you need Code Manager to use a proxy connection, use the
proxy
parameter. You can set a global proxy for all
HTTP(S) operations, proxies for Git or Forge operations, or proxies for individual Git repositories.
Where you specify the proxy
parameter depends on how you
want to apply the setting:
- To set a proxy for all Code Manager operations
occurring over an HTTP(S) transport, set the global
proxy
setting. - To set proxies only for Git operations or
individual Git repos, set the appropriate
git_proxy
parameter on thepuppet_enterprise::master::code_management
class. - To set a proxy only for Forge operations, set the
forge_proxy
key parameter on thepuppet_enterprise::master::code_management
class.
You can set an unauthenticated proxy or an authenticated proxy with either Basic or Digest authentication. For example, this setting is for an unauthenticated proxy:
proxy: 'http://proxy.example.com:3128'
Whereas this setting is for a password-authenticated proxy:
proxy: 'http://user:password@proxy.example.com:3128'
Override proxy settings
You can override the global proxy
setting if you want to:
- Set a different proxy setting for Git or Forge operations.
- Specify a different proxy setting for an individual Git repo.
- Specify a mix of proxy and non-proxy connections.
To override the global proxy setting for all Git
or Forge operations, you need to set the git_proxy
or forge_proxy
parameters on the puppet_enterprise::master::code_management
class.
To set a proxy for an individual Git repository (or if
you have multiple control repos), set the proxy key in the repositories parameter on
the puppet_enterprise::master::code_management
class.
If you have set a global, Git, or Forge proxy, but you don't want a certain
setting to use any proxy, set the proxy
parameter to
an empty string. For example, if you set a global proxy
, but you don't want Forge
operations to use a proxy, you would specify an empty string under the forge_settings
parameter, such
as:
puppet_enterprise::master::code_management::forge_proxy: ''
curl --proxy "<YOUR_PROXY_URI>" --head "https://github.com" curl --proxy "<YOUR_PROXY_URI>" --head "https://forgeapi.puppet.com"
For general information about forming curl commands, authentication in commands, and Windows modifications, go to Using example commands.