Skip to content

git-crypt unlock fails because bash doesn't exist #1

@sallar

Description

@sallar

Hi,

I found this repo randomly but it has solved my issue. thanks for that.
But it took me a while to get it working because the git-crypt unlock KEY command was failing and saying git checkout fails because there is no bash. So this is how I solved this issue:

  - name: 'gcr.io/cloud-builders/gcloud'
    id: Fetch Key
    entrypoint: /bin/sh
    dir: './functions'
    args:
      - '-c'
      - |
        echo "${_GIT_CRYPT_KEY}" | base64 --decode > git-crypt-key

  - name: 'gcr.io/cloudkite-public/git-crypt'
    id: Decrypt
    dir: './functions'
    entrypoint: /bin/sh
    args:
      - '-c'
      - |
        apk add --no-cache bash && git-crypt unlock git-crypt-key

What do you think about adding the apk add --no-cache bash command to the Dockerfile? I can send a PR if you agree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions