Cloning private repos

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!

Hi, first time poster here, but doing devops for some (long) time,
i also run Gitea but didn’t yet configure Agola fully & didn’t reach building private repos.
(I’m atm reconfiguring Gitea with different port as i have different port fw in containers)

Would you be able to introduce what i call a “long step” in the build ? Like a ping command or any infinite loop, so you could exec a shell in the container ? (e.g in what Agola spawns up the golang:1.12-stretch)
There you’d be able to tell if/how git clone is behaving.