sock5代理

git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
git config --global https.https://github.com.proxy socks5://127.0.0.1:1080

http代理

git config --global http.https://github.com.proxy http://127.0.0.1:1080
git config --global https.https://github.com.proxy http://127.0.0.1:1080

ssh协议

Host github.com
User git
ProxyCommand /usr/bin/nc -x 127.0.0.1:8088 %h %p
IdentityFile ~/.ssh/id_rsa

这里的127.0.0.1:8088是sock5代理

1.打开

sudo vim /etc/systemd/logind.conf

2.找到

#HandleLidSwitch=suspend

3.修改成

HandleLidSwitch=ignore

4.重启Login Manager服务

sudo service systemd-logind start

5.done

In bash, set +e is basically the default: If you get an error in a bash script, it normally barfs out an error to the system (this is called an exit code) but the script will continue running.

But if you want errors to cause the script immediately to exit then you can put set -e on a line to force your script to exit on errors from that point on.

*Using set -e should be carefully planned… you don’t want to stop on the first error and miss the second problem, which could something much worse:

(example)
set -e
dodge approaching car (*steering wheel error- abandon program, including the routine to slam on the breaks. You die.)

via quora:https://stackoverflow.com/questions/19622198/what-does-set-e-mean-in-a-bash-script