Skip to content

Commit

Permalink
git config
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandoeqc committed Jul 19, 2021
1 parent 71172c7 commit 180d0c1
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
hash.txt
fail_install
success_install

8 changes: 8 additions & 0 deletions cas
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABDyom4uII
3QGGoj8QAKtpDRAAAAEAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIPeqc5Wn6hBOTHo7
rq4kIi5CIeI4Ho8cttqGLxIwCgCAAAAAkAxYEksinU4rMI5xV2+UgGRnx0xGFYkc1IPNxu
SWzublobPNpSUHuza3T7K8e5PLOQyLFTPNZXMc/3FtDvrA94fz+kf9Zf45BdNzMyKqIbBm
Hn5p0BpCqY+DQ3JSBqs78XUTG8XFkWHDEMJurrbgtdLnA8HrY7JqyTMtIqMTYFMHWUoCrm
mCqmyyFLXVkizF6Q==
-----END OPENSSH PRIVATE KEY-----
1 change: 1 addition & 0 deletions cas.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPeqc5Wn6hBOTHo7rq4kIi5CIeI4Ho8cttqGLxIwCgCA
File renamed without changes.
35 changes: 35 additions & 0 deletions git_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

# ==================================================
# script to connect github using ssh
# only works in new ssh keys
# ==================================================

echo "Enter your username:"
# read username

echo "Enter your email:"
# read email

echo "Hello $username, your e-mail is $email"


# generate new SSH key
ssh-keygen -t ed25519 -C "$email"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

# add a new SSH key to github
### sudo apt-get update
cmd="xclip -h"
if [[ $cmd == 127 ]]; then
sudo apt-get install xclip
else
### xclip -h
fi
xclip -selection clipboard < ~/.ssh/id_ed25519.pub


echo "
====== ssh id was copied to your clipboard ======
"
4 changes: 2 additions & 2 deletions instalacao.sh → install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ cd $parent_path

source programs.sh

log_install="$parent_path/installsuccess"
log_fail="$parent_path/installfail"
log_install="$parent_path/success_install"
log_fail="$parent_path/fail_install"

rm $log_install
touch $log_install
Expand Down
23 changes: 12 additions & 11 deletions programs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ log(){
fi
}

run(){
run(){
#verifica se o programa ja esta instalado
if [[ $verify != 0 ]]; then
$verify 1>/dev/null 2>&1
last_cmd=`echo $?`
#echo $last_cmd
### echo $last_cmd
verify=0

if [[ $last_cmd == 127 ]]; then
run_install=1
else
echo "$cmd already install" >> $log_install
echo "$cmd already install" >> $log_install
fi
fi

if [[ $run_install == 1 ]]; then
echo $cmd
sudo $cmd
Expand All @@ -35,17 +35,13 @@ run(){
}

brave(){
echo'
echo "
sudo apt install apt-transport-https curl
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list
sudo apt update
sudo apt install brave-browser
'
"
}

run_programs(){
Expand Down Expand Up @@ -108,4 +104,9 @@ run_programs(){
cmd="sudo apt install filelight -y"
verify="filelight -h"
run

echo "### install sublime ###"
cmd="sudo snap install --classic sublime-text"
verify="subl -h"
run
}
3 changes: 2 additions & 1 deletion installsuccess → success_install
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ apt-get install -y build-essential already install
apt install -y minicom already install
apt install -y git-all already install
snap install --classic code already install
brave
brave already install
sudo apt install -y tmux already install
sudo apt install -y hexedit already install
sudo apt install -y nmap already install
sudo apt install socat -y already install
sudo apt install net-tools -y already install
sudo apt install filelight -y already install
sudo snap install --classic sublime-text already install

0 comments on commit 180d0c1

Please sign in to comment.