Created
December 17, 2023 17:07
-
-
Save mkm29/986c9973bdf993e15ed9b586e67b5503 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unlock_bw_if_locked() { | |
if [[ -z $BW_SESSION ]] ; then | |
>&2 echo 'bw locked - unlocking into a new session' | |
export BW_SESSION="$(bw unlock --raw)" | |
fi | |
} | |
load_darkwolf_gitlab() { | |
unlock_bw_if_locked | |
# Note that this gitlab_pat_id value will be different for you! | |
local -r gitlab_pat_id='bd3ca34a-3604-41e2-b327-b0db010af724' | |
local gitlab_token | |
gitlab_token="$(bw get notes $gitlab_pat_id)" | |
export GITLAB_HOST="dev.darkwolf.io" | |
export GITLAB_USERNAME="mitchell.murphy" | |
export GITLAB_TOKEN="$gitlab_token" | |
export GIT_TOKEN="$gitlab_token" | |
export GIT_USER="mitchell.murphy" | |
} | |
load_darkwolf_gitlab "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment