Git & Github

1. When i download files from GitHub, Failed to connect to 127.0.0.1 port 1080: Connection refused

  1. Find wheather you are using proxy server or not.
git config --global http.proxy
  1. Cancel the proxy server.
git config --global --unset http.proxy

2. Clone with SSH (Github guide)

  • Install Openssh
sudo pacman -S openssh
  • Generating a new SSH key
ssh-keygen

tree .ssh

  • Copy the SSH key to your clipboard
cat .ssh/id_rsa.pub
  • In the upper-right corner of any page, click your profile photo, then click Settings

  • In the user settings sidebar, click SSH and GPG keys

  • Click New SSH key or Add SSH key.

  • In the “Title” field, add a descriptive label for the new key. For example, if you’re using arch linux, you might call this key “Arch linux”

  • Paste your key into the “Key” field.

  • If prompted, confirm your GitHub password.

3.Mandatory update of local repository

git fetch --all &&  git reset --hard origin/master && git pull

   转载规则


《Git & Github》 GeekOcean 采用 知识共享署名 4.0 国际许可协议 进行许可。
  目录