How to run drone exec with private repository

Hello,
I’m working on my github private repo and added this kind of .drone.yml:

pipeline:
  test:
    image: golang
    commands:
      - go get -d ./...
      - go test -v ./...

Now when I run drone exec to test locally, I get this error fatal: could not read Username for 'https://github.com': terminal prompts disabled when cloning the repo.
I know this is a typical go problem when working with private repositories, but I don’t know how to solve it with drone exec

2 Likes