fix subdir and hopefully gpg decrypt
This commit is contained in:
8
gpush
8
gpush
@@ -9,7 +9,7 @@ fi
|
||||
token="$(pass show gitea/token/${project})"
|
||||
if [[ -z "$token" ]]; then
|
||||
printf 'Failed to get token for %s. ' "$project" >&2
|
||||
printf 'Must be one of:\n\n' "$project" >&2
|
||||
printf 'Must be one of:\n\n' >&2
|
||||
pass show gitea/token >&2
|
||||
exit 1
|
||||
fi
|
||||
@@ -21,14 +21,14 @@ if [[ "$project" == 'pass' ]]; then
|
||||
pass git push "$url"
|
||||
if [[ $? != 0 ]]; then
|
||||
printf 'no upstream. setting..\n' >&2
|
||||
git push --set-upstream "$url" main
|
||||
GPG_TTY=$(tty) git push --set-upstream "$url" main
|
||||
fi
|
||||
else
|
||||
git config user.signingkey "$gpg_key"!
|
||||
git config commit.gpgsign true
|
||||
git push "$url"
|
||||
GPG_TTY=$(tty) git push "$url"
|
||||
if [[ $? != 0 ]]; then
|
||||
printf 'no upstream. setting..\n' >&2
|
||||
git push --set-upstream "$url" main
|
||||
GPG_TTY=$(tty) git push --set-upstream "$url" main
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user