Created
December 17, 2023 17:09
-
-
Save mkm29/0de53f77486399527081295b25be1471 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_mcs_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="code.sclzdev.net" | |
export GITLAB_USERNAME="mitchell.murphy" | |
export GITLAB_TOKEN="$gitlab_token" | |
export GIT_TOKEN="$gitlab_token" | |
export GIT_USER="mitchell.murphy" | |
} | |
load_mcs_gitlab "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment