VSC connection (via GithubApp) SSH over HTTPS


I installed Waypoint on an EKS cluster running behind a corporate proxy. I am trying to connect to VSC from the UI, but Github Organization is rejecting HTTPS connections, so I need to connect via SSH. However, the Corporate Proxy blocks port 22.

So, I found SSH over HTTP support in the Github Document

I specified org-<id>@ssh.github.com:<org-name>/<repo-neme>.git as the source URL, but Waypoint’s Job logs show an attempt to access on port 22 :frowning:

Has anyone already tried this configuration?

I’m starting to understand a little more now, but a new mystery has arisen. A profile with PROXY settings is placed for the ODR generated from the Static runner:

waypoint runner profile set \
    -name=odr-profile \
    -plugin-type=kubernetes \
    -oci-url=docker.io/hashicorp/waypoint-odr:0.11.0 \
    -default \
    -env-var=WAYPOINT_SERVER_ADDR=waypoint-server:9701 \
    -env-var=HTTP_PROXY=http://proxy.address:port \
    -env-var=http_proxy=http://proxy.address:port \
    -env-var=HTTPS_PROXY=http://proxy.address:port \
    -env-var=https_proxy=http://proxy.address:port \
    -env-var=NO_PROXY=,,cluster.local.,.cluster.local,.svc,localhost,,,.waypoint,waypoint-ui,waypoint-server \
    -env-var=no_proxy=,,cluster.local.,.cluster.local,.svc,localhost,,,.waypoint,waypoint-ui,waypoint-server \

I set up a Private Key for the GitHub App and entered the following in the Source URL:

From stdout of the odr, I could see that it is trying to access the site via HTTPS, but when I check the Proxy server log, nothing is recorded. The server could not be reached. Does ODR not respect PROXY environment variables?

» Runner logs:
2023-02-25T18:09:33.381Z [DEBUG] waypoint.runner.agent.runner: job finished: job_id=01GT4W4352B24EF3SM9PF9WGPM job_op="*gen.Job_Init"
  | rpc error: code = Aborted desc = Git clone failed: dial tcp connect: connection timed out
  | Output: 
2023-02-25T18:09:33.381Z [WARN]  waypoint.runner.agent.runner: error during job execution: job_id=01GT4W4352B24EF3SM9PF9WGPM job_op="*gen.Job_Init"
  | rpc error: code = Aborted desc = Git clone failed: dial tcp connect: connection timed out
  | Output: 
2023-02-25T18:09:33.386Z [DEBUG] waypoint.runner.agent: handled our one job in ODR mode, exiting
2023-02-25T18:09:33.386Z [INFO]  waypoint.runner.agent: quit request received, gracefully stopping runner
2023-02-25T18:09:33.386Z [WARN]  waypoint.runner.agent.runner.config.watcher: exiting due to context ended

@k21205 - One thing I would check is when an on-demand runner is spawned, those environment variables you’ve set for your runner profile is actually set on the runner. You might need to update your Kubernetes cluster to not clean up short-lived tasks (which is what ODR spawns as in k8s), but if you can get access to the ODR pod, are those environment variables set?

@briancain Hi, Thanks for reaching out!
This is part of the Describe of the short-lived ODR Pod that is actually generated:

Name:             waypoint-task-01gtg54fg4m5qb3gjfmzq1sca9-nbjct
Namespace:        waypoint
Priority:         0
Controlled By:  Job/waypoint-task-01gtg54fg4m5qb3gjfmzq1sca9
    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Thu, 02 Mar 2023 12:16:30 +0900
      Finished:     Thu, 02 Mar 2023 12:16:31 +0900
      WAYPOINT_SERVER_TLS:              true
      WAYPOINT_SERVER_ADDR:             waypoint-server:9701
      HTTPS_PROXY:                      http://proxy.address:port
      HTTP_PROXY:                       http://proxy.address:port
      NO_PROXY:               ,,cluster.local.,.cluster.local,.svc,localhost,,,.internal,.waypoint,waypoint-ui,waypoint-server
      WAYPOINT_SERVER_TOKEN:            <token>
      WAYPOINT_RUNNER_ID:               <runner-id>
      container:                        docker
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-fpt2b (ro)

This ensures that environment variables are properly assigned. Environment variables are properly assigned. I noticed that SSH over HTTPS is only an SSH protocol even if the port is 443. Therefore, these Proxy settings are ignored…

So I tried to access the repository on an HTTPS basis using the Github App installation ID:

It is interesting to note that while accessing this URL locally successfully retrieves refs, Waypoint ODR returns the following log from go-git:

  | rpc error: code = Aborted desc = Git clone failed: Get "https://x-access-token:***@github.com/<orgname>/<reponame>.git/info/refs?service=git-upload-pack": Forbidden
  | Output: