1
0
Fork 0

dotfiles: remove shenanigans with read-only SSH key

This commit is contained in:
tastytea 2024-03-11 22:59:49 +01:00
parent af3022b52a
commit a8a95f9dd4
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
2 changed files with 9 additions and 14 deletions

View File

@ -52,12 +52,7 @@ alias ta="tmux attach -t tastytea || tmux new-session -s tastytea"
alias exifremove='exiftool -all='
local _tmp_config_alias='git --git-dir=${HOME}/.dotfiles --work-tree=${HOME}'
if [[ "${HOST}" != "ventiloplattform" && -f ~/.ssh/noid_dotfiles ]]; then
_tmp_config_alias="GIT_SSH_COMMAND=\"ssh -i ~/.ssh/noid_dotfiles\" ${_tmp_config_alias}"
fi
alias config="${_tmp_config_alias}"
unset _tmp_config_alias
alias config='git --git-dir=${HOME}/.dotfiles --work-tree=${HOME}'
alias edot="GIT_DIR=${HOME}/.dotfiles GIT_WORK_TREE=${HOME} ${VISUAL}"
alias cmake_static='cmake -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" -DBUILD_SHARED_LIBS=OFF -D CMAKE_EXE_LINKER_FLAGS="-static"'

View File

@ -4,16 +4,16 @@
setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL
local repo_address="https://schlomp.space/tastytea/dotfiles.git"
local tmp_git_command='git --git-dir=${HOME}/.dotfiles --work-tree=${HOME}'
if [[ -f ~/.ssh/noid_dotfiles ]]; then
print -P "%F{12}Using dotfiles SSH-key%f"
alias config='git --git-dir=${HOME}/.dotfiles --work-tree=${HOME}'
local response
while [[ ! ${response} =~ '[yYnN]' ]]; do
print -n "use SSH? [y/n] "
read response
done
if [[ ${response[1]} =~ "[yY]" ]]; then
repo_address="git@schlomp.space:tastytea/dotfiles.git"
export GIT_SSH_COMMAND="ssh -i ~/.ssh/noid_dotfiles"
tmp_git_command="GIT_SSH_COMMAND=\"ssh -i ~/.ssh/noid_dotfiles\" ${tmp_git_command}"
else
print -P "%F{12}No dotfiles SSH-key found, using HTTP access%f"
fi
alias config=${tmp_git_command}
git clone --bare ${repo_address} ${HOME}/.dotfiles
config config --local status.showUntrackedFiles no