Change the repository URL of local working copy:
View the current origin URL: $ git remote -v
$ git remote set-url origin https://github.com/<user>/<repo>.git
If you try to access the repository (clone, push, ...etc) via HTTP/HTTPS, the following error occurred:
error: The requested URL returned error: 403 while accessing https://github.com/user/repo.git/info/refsUse SSH (get the URL from the repository):
fatal: HTTP request failed
$ git remote set-url origin git@github.com:<user>/<repo>.git
Connecting over SSH
If you clone with SSH, you must generate SSH keys on each computer you use to push or pull from GitHub.
Note: you can use the ~/.ssh/config to setup the SSH authentication instead of ssh-agent
Template of .gitignore
https://github.com/github/gitignore
Reference:
https://help.github.com/set-up-git-redirect
https://help.github.com/create-a-repo
https://help.github.com/articles/fork-a-repo/
https://help.github.com/articles/https-cloning-errors/
https://help.ubuntu.com/lts/serverguide/git.html
沒有留言:
張貼留言