how to get Go to work with private github repo

4,398 views
Skip to first unread message

Paul BH

unread,
Apr 19, 2014, 1:17:18 PM4/19/14
to go...@googlegroups.com
Hi there,
 just starting to evaluate using Go but bumping up against an issue that's hampering things. I'm trying to setup my first pipeline using Go on Mac OSX but when I try to connect to the private repo, I get the following error:

Repository https://github.com/foo/bar not found! : Error performing command: --- Command --- git ls-remote https://github.com/foo/bar --- Environment --- {} --- INPUT ---- --OUTPUT --- --- ERROR --- ERROR: git: 'credential-osxkeychain' is not a git command. See 'git --help'. ERROR: fatal: could not read Username for 'https://github.com': Device not configured ---

I guesse the issue is with Go not being able to authenticate using SSH, but any idea how I can resolve this?

Thanks in advance

PBH

Ketan Padegaonkar

unread,
Apr 20, 2014, 6:23:16 AM4/20/14
to Paul BH, go...@googlegroups.com

Try using basic auth - https://user:pa...@github.com/user/repo

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ketan Padegaonkar

unread,
Apr 20, 2014, 6:29:50 AM4/20/14
to Paul BH, go...@googlegroups.com

Fat fingered.

To continue where I left off - alternatively if your agents are managed by chef/puppet you can mange the passwords using a .netrc file or ssh private keys in the home directory of the go user.

Paul BH

unread,
Apr 20, 2014, 12:16:38 PM4/20/14
to go...@googlegroups.com, Paul BH
Awesome, thanks Ketan: basic auth worked. Plan to use puppet eventually, but not just yet.

Cheers for the nudge in the right direction.

PBH

Kritul Rathod

unread,
Dec 30, 2018, 7:39:06 PM12/30/18
to go-cd

The basic authentication works fine using below URL template.


https://[username]:[password]@bitbucket.org/[organization]/[projectname].git


I was using my email as username but for this URL I could just use my profile name and it worked.


Hope this helps.

Kritul

Reply all
Reply to author
Forward
0 new messages