Github: Difference between revisions
From charlesreid1
(Created page with "SSH Keys To be able to clone projects from Github using SSH instead of HTTPS (which will also keep it from pestering you for your Github password every time you do something)...") |
No edit summary |
||
| (8 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
SSH Keys | For info on using Github for an authentication layer: [[Github/Authentication]] | ||
=Packaging and Releases= | |||
{{Main|Github/Packaging}} | |||
Basic setup for a package that regularly tests and releases versions on Github: | |||
* Travis for running automated CI tests | |||
* Release versions, stored at <code>github.com/<username>/<reponame>/archive/<package>-<major>.<minor>.tar.gz</code> | |||
* Useful tags for issues | |||
* Bots for maintaining issues | |||
* Bots for monitoring/commenting on pull requests | |||
=SSH Keys= | |||
Official page here: https://help.github.com/articles/generating-ssh-keys/ | |||
To be able to clone projects from Github using SSH instead of HTTPS (which will also keep it from pestering you for your Github password every time you do something), you first have to set up a public key with Github. This will allow your computer to SSH into Github's server without a password, and from there you can fetch Github projects. | To be able to clone projects from Github using SSH instead of HTTPS (which will also keep it from pestering you for your Github password every time you do something), you first have to set up a public key with Github. This will allow your computer to SSH into Github's server without a password, and from there you can fetch Github projects. | ||
==Create Public Key== | |||
To create a public key: | To create a public key: | ||
| Line 10: | Line 27: | ||
Now you'll be prompted with some questions, and your private and public key pairs will be generated and put into your <code>~/.ssh</code> directory. | Now you'll be prompted with some questions, and your private and public key pairs will be generated and put into your <code>~/.ssh</code> directory. | ||
==Add Public Key== | |||
Now go to Github.com, and click your personal icon, and Manage Profile. | Now go to Github.com, and click your personal icon, and Manage Profile. | ||
| Line 15: | Line 34: | ||
Now click SSH Public Keys on the left hand menu. | Now click SSH Public Keys on the left hand menu. | ||
Add your new computer name. Now you'll copy and paste your public key from the terminal. You can dump | Add your new computer name. Now you'll copy and paste your public key from the terminal. | ||
==Copy-Paste Public Key== | |||
You can dump out your public key with the command: | |||
<pre> | <pre> | ||
| Line 23: | Line 46: | ||
That will print it to the screen, where you can copy and paste it into Github. | That will print it to the screen, where you can copy and paste it into Github. | ||
==Test== | ==Test Public Key== | ||
To test that you can successfully access Github's server without a password, execute the command: | To test that you can successfully access Github's server without a password, execute the command: | ||
| Line 36: | Line 59: | ||
Now we can clone projects using the SSH repository address, <code>git clone git@github.com:username/projectname</code>, instead of the HTTPS address. | Now we can clone projects using the SSH repository address, <code>git clone git@github.com:username/projectname</code>, instead of the HTTPS address. | ||
[[Category:SSH]] | |||
[[Category:Git]] | |||
[[Category:Github]] | |||
Latest revision as of 21:04, 8 October 2018
For info on using Github for an authentication layer: Github/Authentication
Packaging and Releases
Basic setup for a package that regularly tests and releases versions on Github:
- Travis for running automated CI tests
- Release versions, stored at
github.com/<username>/<reponame>/archive/<package>-<major>.<minor>.tar.gz - Useful tags for issues
- Bots for maintaining issues
- Bots for monitoring/commenting on pull requests
SSH Keys
Official page here: https://help.github.com/articles/generating-ssh-keys/
To be able to clone projects from Github using SSH instead of HTTPS (which will also keep it from pestering you for your Github password every time you do something), you first have to set up a public key with Github. This will allow your computer to SSH into Github's server without a password, and from there you can fetch Github projects.
Create Public Key
To create a public key:
$ ssh-keygen -t rsa -b 4096 -C "your@email.com"
Now you'll be prompted with some questions, and your private and public key pairs will be generated and put into your ~/.ssh directory.
Add Public Key
Now go to Github.com, and click your personal icon, and Manage Profile.
Now click SSH Public Keys on the left hand menu.
Add your new computer name. Now you'll copy and paste your public key from the terminal.
Copy-Paste Public Key
You can dump out your public key with the command:
$ cat ~/.ssh/id_rsa.pub
That will print it to the screen, where you can copy and paste it into Github.
Test Public Key
To test that you can successfully access Github's server without a password, execute the command:
$ ssh -T git@github.com
from the command line. You should see a message that indicates you can successfully connect to Github's servers.
Use
Now we can clone projects using the SSH repository address, git clone git@github.com:username/projectname, instead of the HTTPS address.