sh git.sh

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh git.sh相关的知识,希望对你有一定的参考价值。

#!/bin/bash

if ! [ -x "$(command -v xclip)" ]; then
  echo 'Error: xclip is not installed.' >&2
  sudo apt install curl
fi


if [ -e ~/.ssh/id_rsa.pub ]
then
    xclip -sel clip < ~/.ssh/id_rsa.pub
else
	read -p "Digite seu email do git: " email
	ssh-keygen -t rsa -b 4096 -C email
	eval "$(ssh-agent -s)"
	ssh-add ~/.ssh/id_rsa
fi


if [ -e ~/.ssh/id_rsa.pub ]
then
    xclip -sel clip < ~/.ssh/id_rsa.pub
fi

git config --global url."git@github.com:".insteadOf "https://github.com/"

echo "Acesse sua conta do github. Entre em Settings, SSH and GPG keys, New SSH Key. Cole o conteudo e nomeie a chave, clique em salvar."

以上是关于sh git.sh的主要内容,如果未能解决你的问题,请参考以下文章

sh git.sh

sh git-nb.sh

sh git.sh

sh git-rebase.sh

sh git-impact.sh

sh 安装节点5.10-git.sh