Fatal: could not read Username for 'https://github.com' in GoLang project

My go project fails at building/ executing because it is unable to find package github.com/mg98/my-project/.... This package in fact is the project itself and the same repository that I am running circleci for. It is a private repository. Oh and I want to add that my go project is running in a docker environment! Maybe that is relevant.

fatal: could not read Username for 'https://github.com': terminal prompts disabled
Confirm the import path was entered correctly.
If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.

I have been following these steps: https://circleci.com/docs/2.0/add-ssh-key/
I have checked the reffered https://golang.org/doc/faq#git_https:

  • machine command was not found
  • ~/.gitconfig was already configured that way

And I really don’t know what to do now. I hope somebody can help me.

Have a nice day!

Hi @mg98!

If your config file doesn’t contain any sensitive information, can you reply back with it so I can take a closer look?

If it contains information that is private, then can you submit a support request with a link to the failing build and a link to this post?

That way I can take a closer look at the overall setup and troubleshoot further.

Thank you!