forked from swcarpentry/git-novice
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 71_pr_not_same_pull
- Loading branch information
Showing
24 changed files
with
616 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,8 +47,26 @@ explanation of why the repository needs to be empty. | |
|
||
![](fig/github-create-repo-02.png){alt='The second step in creating a repository on GitHub: filling out the new repository form to provide the repository name, and specify that neither a readme nor a license should be created'} | ||
|
||
::: spoiler | ||
|
||
### Repository Visibility | ||
|
||
Here we have chosen to make our repository public. | ||
The visibility of your repository depends on which option you choose: | ||
|
||
- Private: only you | ||
- Internal (organisations only): read permissions to anyone in the organisation | ||
- Public: read permissions to anyone | ||
|
||
Some organisations will restrict the creation of public repositories | ||
so you may find their default is internal. | ||
If your project deals with sensitive material then create a private repository. | ||
|
||
::: | ||
|
||
As soon as the repository is created, GitHub displays a page with a URL and some | ||
information on how to configure your local repository: | ||
information on how to configure your local repository. | ||
Ignore the suggested commands for now as we will run these later. | ||
|
||
![](fig/github-create-repo-03.png){alt='The summary page displayed by GitHub after a new repository has been created. It contains instructions for configuring the new GitHub repository as a git remote'} | ||
|
||
|
@@ -125,6 +143,22 @@ talking about how they might be used for collaboration. | |
|
||
## 3\. SSH Background and Setup | ||
|
||
::: instructor | ||
|
||
Some learners may have set up an ssh key already. | ||
If they have a key with this name: `~/.ssh/id_ed25519_github` | ||
and can successfully authenticate with `ssh -T [email protected]` | ||
they can skip this section. | ||
|
||
If their ssh key name does not match the one above we **strongly** | ||
recommend they follow the instructions below. | ||
|
||
Those who are skipping this section can revisit the challenges | ||
in earlier episodes (yellow callouts with a lightning bolt) | ||
or read through the [discussion notes](../learners/discuss.md). | ||
|
||
::: | ||
|
||
Before you can connect to a remote repository, you need to set up a way for your computer to authenticate with GitHub so it knows it's you trying to connect to the remote repository. | ||
|
||
We are going to set up the method that is commonly used by many different services to authenticate access on the command line. This method is called Secure Shell Protocol (SSH). SSH is a cryptographic network protocol that allows secure communication between computers using an otherwise insecure network. | ||
|
@@ -318,6 +352,25 @@ Hi Eleanor! You've successfully authenticated, but GitHub does not provide shell | |
|
||
Good! This output confirms that the SSH key works as intended. We are now ready to push our work to the remote repository. | ||
|
||
::: spoiler | ||
|
||
### Troubleshooting SSH Setup | ||
|
||
If your new key failed to connect you may need to alter your ssh config. | ||
|
||
1. Create the `~/.ssh/config` file if it doesn't exist | ||
2. Add the following to the file: | ||
|
||
```ssh-config | ||
Host github.com | ||
IdentityFile ~/.ssh/id_ed25519_github | ||
``` | ||
|
||
This explicitly states which key to use for github.com | ||
and is needed if you have many SSH keys already for other hosts. | ||
|
||
::: | ||
|
||
## 4\. Push local changes to a remote | ||
|
||
Now that authentication is setup, we can return to the local repository. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.