diff --git a/.woodpecker.yml b/.woodpecker.yml index e4a28da..7a6a527 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -14,40 +14,6 @@ steps: dockerfile: Dockerfile - scan: - image: quay.io/wollud1969/woodpecker-helper:0.5.1 - environment: - TRIVY_TOKEN: - from_secret: trivy_token - TRIVY_URL: - from_secret: trivy_url - DTRACK_API_KEY: - from_secret: dtrack_api_key - DTRACK_API_URL: - from_secret: dtrack_api_url - commands: - - export GOPATH=/woodpecker/go # the export is required, otherwise trivy will not consider the variable - - HOME=/home/`id -nu` - - TAG="${CI_COMMIT_TAG:-$CI_COMMIT_SHA}" - - | - trivy image \ - --server $TRIVY_URL \ - --token $TRIVY_TOKEN \ - --format cyclonedx \ - --scanners license \ - --output /tmp/sbom.xml \ - $FORGE_NAME/$CI_REPO:$CI_COMMIT_SHA - - cat /tmp/sbom.xml - - | - curl -X "POST" \ - -H "Content-Type: multipart/form-data" \ - -H "X-Api-Key: $DTRACK_API_KEY" \ - -F "autoCreate=true" \ - -F "projectName=$CI_REPO" \ - -F "projectVersion=$TAG" \ - -F "bom=@/tmp/sbom.xml"\ - "$DTRACK_API_URL/api/v1/bom" - deploy: image: portainer/kubectl-shell:latest environment: diff --git a/content/snippets/0300-ssh-keys-from-token-on-macos.md b/content/snippets/0300-ssh-keys-from-token-on-macos.md new file mode 100644 index 0000000..8438d67 --- /dev/null +++ b/content/snippets/0300-ssh-keys-from-token-on-macos.md @@ -0,0 +1,29 @@ +# SSH Keys from Token on MacOS + +Install gnupg and opensc using homebrew: + +``` +brew install gnupg +brew install opensc +``` + +Create gpg-agent.conf file in `~/.gnupg`: + +``` +enable-ssh-support +pinentry-program /opt/homebrew/bin/pinentry-mac + +default-cache-ttl 600 +max-cache-ttl 7200 +default-cache-ttl-ssh 600 +max-cache-ttl-ssh 7200 +``` + +Load agent in `.bashrc`: + +``` +SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) +export SSH_AUTH_SOCK +gpg-connect-agent /bye +``` +