SSH quality of life improvements.
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
Host gitea gitea.* github.com gitlab.com *.github.com *.gitlab.com
|
Match canonical Host gitea,gitea.*,github.com,gitlab.com,*.github.com,*.gitlab.com
|
||||||
User git
|
User git
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@ rm -f ~/.ssh/search
|
|||||||
|
|
||||||
if [ -e ${CSHENV_DIR}/ssh/ssh-search-domains ]
|
if [ -e ${CSHENV_DIR}/ssh/ssh-search-domains ]
|
||||||
then
|
then
|
||||||
domains=`grep "^search" /etc/resolv.conf | cut -c 8- - | cat - ${CSHENV_DIR}/ssh/ssh-search-domains | xargs`
|
domains=`grep "^search" /etc/resolv.conf | cut -c 8- - | cat - ${CSHENV_DIR}/ssh/ssh-search-domains | sort -u | xargs`
|
||||||
else
|
else
|
||||||
domains=`grep "^search" /etc/resolv.conf | cut -c 8- - | xargs`
|
domains=`grep "^search" /etc/resolv.conf | cut -c 8- - | sort -u | xargs`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${domains}" ] ; then exit 1; fi
|
if [ -z "${domains}" ] ; then exit 1; fi
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# That config uses Canonicalization to emulate what your local resolver
|
# That config uses Canonicalization to emulate what your local resolver
|
||||||
# does in these circumstances.
|
# does in these circumstances.
|
||||||
Match exec "~/cshenv/ssh/gen-search.sh"
|
Match !canonical !final exec "~/cshenv/ssh/gen-search.sh"
|
||||||
Include ~/.ssh/search
|
Include ~/.ssh/search
|
||||||
|
|
||||||
# vim: ft=sshconfig
|
# vim: ft=sshconfig
|
||||||
|
@ -73,5 +73,6 @@ echo "" >> ~/.gitconfig
|
|||||||
echo "[commit]" >> ~/.gitconfig
|
echo "[commit]" >> ~/.gitconfig
|
||||||
echo " gpgSign = true" >> ~/.gitconfig
|
echo " gpgSign = true" >> ~/.gitconfig
|
||||||
|
|
||||||
echo "Do not forget to add the following line at the top of your ssh config:"
|
echo "Do not forget to add the following lines at the top and bottom of your ssh config:"
|
||||||
echo "Include ${CSHENV_LOCATION}/ssh/config"
|
echo "Match all\n Include ${CSHENV_LOCATION}/ssh/config"
|
||||||
|
echo "Match all\n Include ${CSHENV_LOCATION}/ssh/config"
|
||||||
|
Reference in New Issue
Block a user