proxygithub-actionsdebiangithub-enterprisegithub-actions-self-hosted-runners

Self-hosted runner proxy URI malformed


I want to use a self-hosted runner for a local GitHub Enterprise Server Instance on a Debian machine. I already installed the runner and the connection to my local GitHub is established. All machines are running behind a corporate HTTP proxy. Now if I want to run a workflow which requires an outbound connection, I'll get a timeout because of the not configured proxy. After some research I configured the proxy in the .env file located in the action runner directory with the http_proxy and https_proxy variable.

The proxy requires Authentication via username and password and the proxy runs on port 8080 for example. So my proxy connection string would look like the following: http://myuser:mypass@myproxy.local:8080. This proxy connection string works perfectly on all linux based machines and other programs. But if I want to use GitHub Actions runner behind this proxy, any ran action failed with the exit message: URI malformed.

I already tried many variations of the proxy connection string:

I also tried using the IP address of the proxy instead of the domain name: same errors as listed above.

Does anybody know how to fix the error "URI malformed" and how to configure the proxy for self-hosted runners? Or can tell me why the URI is malformed?

The password could contain special characters e.g. !, ?, $, %, &.


Solution

  • You can url encode your password. For example for a password “myp$ss”

    export http_proxy="http://myuser:myp%24ss@myproxy.local:8080"
    export https_proxy="http://myuser:myp%24ss@myproxy.local:8080"