Hedgehog
Hedgehog

Reputation: 5657

Salt: Unpack a tar.gz from a private github repository release

Using salt, how do you unpack a tar.gz from a private github repository release?

So far I've not found any documentation that addresses this use case.

Specifically, if I understand correctly, passing a token vai a HTTP header - however that could be mistaken.

Upvotes: 0

Views: 728

Answers (1)

seshadri_c
seshadri_c

Reputation: 7340

Since the git state allows us authenticate to a Git repository, I can suggest a 2 step process.

  1. Clone the repository with git state
  2. Extract the file with archive state

Example:

clone-git-repo:
  git.latest:
    - name: https://mygitrepo.com/user/myrepo.git
    - target: /home/user/myrepo
    - https_user: username
    - https_pass: secret

extract-archive:
  archive.extracted:
    - name: /tmp
    - source: file:///home/user/myrepo/archive.tar.gz

Upvotes: 1

Related Questions