Hey folks,
I’m trying to clone a private repo and running into some trouble with the clone:
type. It basically says that Agola’s SSH key lacks access. Is there a recommended setup to get this working?
Secondarily, I was going to setup a secret and pass in the OAuth token via an environment variable but I was also having trouble getting command
to use an environment variable. Here’s my config:
- name: build
tasks:
- name: build go 1.12
runtime:
type: pod
arch: amd64
containers:
- image: golang:1.12-stretch
environment:
GO111MODULE: "on"
GIT_TOKEN:
from_variable: git
steps:
- run: - run:
name: clone name: clone
command: git clone https://${GIT_TOKEN}:x-oauth-basic@git.gopherworks.io/gopherworks/website command: git clone https://$GIT_TOKEN:x-oauth-basic@git.gopherworks.io/gopherworks/website
I’ve tried various different ways of referencing the environment variable like $GIT_TOKEN and even just referencing it as a Go template variable like {{ git }} but it doesn’t seem to take effect.
Any tips would be appreciated!