telia-oss / concourse-tasks

Common concourse tasks.
MIT License
3 stars 5 forks source link

Add access_token to support cloning private terraform modules #21

Closed itsdalmo closed 5 years ago

itsdalmo commented 5 years ago

Picked the .netrc trick up from here: https://github.com/concourse/git-resource/blob/master/assets/common.sh#L143

Have validated that this works with private repositories - I opted to go with access_token because deploy keys can only access a single repository at a time, and I'd rather not introduce a third credential type to "working with concourse". Using an access token also has an added benefit; we don't have to change the source=github.com to git::github.com for modules.

mikael-lindstrom commented 5 years ago

Will this access token be restricted to specific repositories?

itsdalmo commented 5 years ago

It could be whatever access token one wanted it to be, but currently the one that is available is restricted to repos where concourse is installed - and I think it makes sense to stick to that one.

mikael-lindstrom commented 5 years ago

Should be fine, when we start having private-private repositories not open to the whole org we might need to rethink this but lets deal with that then.