short explanation why to use SSH #130

Merged
fnetX merged 5 commits from :explain_ssh into master 12 months ago
rwa commented 12 months ago
Collaborator

I was unsure where to put that information, i decided to update the entry page of "Working with Git Repositories" with some additional information.

comments welcome

ssh-key.md is detected as a complete change cause i added a hint to ssh agents and changed to unix-style eol. At the moment the markdown files seem to have mixed eol style - not sure if this is intentional.

closes #94

I was unsure where to put that information, i decided to update the entry page of "Working with Git Repositories" with some additional information. comments welcome `ssh-key.md` is detected as a complete change cause i added a hint to ssh agents and changed to unix-style eol. At the moment the markdown files seem to have mixed eol style - not sure if this is intentional. closes #94
rwa added 1 commit 12 months ago
rwa added 1 commit 12 months ago
rwa changed title from WIP: short explanation why to use SSH to short explanation why to use SSH 12 months ago
fnetX reviewed 12 months ago
fnetX left a comment
Collaborator

Nice, thank you.

Nice, thank you.
Before you are able to access git repositories via SSH you need to [add a SSH key to your account](/security/ssh-key).
> **Warning**
> **Warning**
Collaborator

Just wondering: do the added spaces serve a function, e.g. a Markdown newline?

Just wondering: do the added spaces serve a function, e.g. a Markdown newline?
rwa commented 12 months ago
Poster
Collaborator

exactly that: markdown newline without introducing a new paragraph

exactly that: markdown newline without introducing a new paragraph
rwa marked this conversation as resolved
content/home.md Outdated
If you're new to Codeberg, consider reading the [Getting Started Guide](/getting-started).
If you're new to Codeberg, consider reading the [Getting Started Guide](/getting-started).
Collaborator

I think you can completely drop this? Things are always changing and the docs are more complete than they have been when this was added ...

Edit: Talking about the three white spaces after the warning, looks like the review comment is shifted again in the conversation view 😬

I think you can completely drop this? Things are always changing and the docs are more complete than they have been when this was added ... Edit: Talking about the three white spaces after the warning, looks like the review comment is shifted again in the conversation view 😬
rwa marked this conversation as resolved
The private key part of your SSH key can be protected by a passphrase. This adds an additional layer of authentication which increases security. Be aware that this will only be helpful for certain attack scenarios and does not offer 100% protection. It is recommended to keep your private key safe and - well - private.
If you are using a passphrase-protected SSH key the use of a ssh agent is strongly encouraged for improved usability. You need to enter the passphrase only once during a session.
Collaborator

Should we clarify further how to achieve this?
I could imagine someone being a bit lost here - how to set this up? Where to find help?
Don't worry if this is out-of-scope, I'm not asking for a complete how-to-use-my-PC walkthrogh, but I just thought it might be nice if we could link someplace where you can find more information? What do you think?

Should we clarify further how to achieve this? I could imagine someone being a bit lost here - how to set this up? Where to find help? Don't worry if this is out-of-scope, I'm not asking for a complete how-to-use-my-PC walkthrogh, but I just thought it might be nice if we could link someplace where you can find more information? What do you think?
rwa commented 12 months ago
Poster
Collaborator

@fnetX the default ssh-keygen flow i know of automatically asks for a passphrase:

$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again:

I'll try to adjust the wording a bit to reflect this.

@fnetX the default `ssh-keygen` flow i know of automatically asks for a passphrase: ``` $ ssh-keygen -t rsa -b 4096 -C "your_email@example.com" Generating public/private rsa key pair. Enter file in which to save the key (/home/user/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: ``` I'll try to adjust the wording a bit to reflect this.
n marked this conversation as resolved
n added the
Kind: Documentation
label 12 months ago
n added the
Status: Review
label 12 months ago
n requested changes 12 months ago
---
Before you are able to use SSH for git you need to [add an SSH key to your account](/security/ssh-key).
Before you are able to access git repositories via SSH you need to [add a SSH key to your account](/security/ssh-key).
n commented 12 months ago
Collaborator

a SSH key --> an SSH key

`a SSH key` --> `an SSH key`
rwa marked this conversation as resolved
with Codeberg.
Please note that this is a Work in Progress.
n commented 12 months ago
Collaborator

Unless it's referencing the command, let's make the first letter of Git uppercase everywhere.

Unless it's referencing the command, let's make the first letter of Git uppercase everywhere.
There are 3 ways to interact with a git repository hosted on Codeberg:
1. [via the SSH protocol](/git/clone-commit-via-ssh)
2. [via the HTTPS protocol](/git/clone-commit-via-http)
n commented 12 months ago
Collaborator

Please remove the double-spacing in between the and website.

Please remove the double-spacing in between `the` and `website`.
rwa marked this conversation as resolved
1. [via the SSH protocol](/git/clone-commit-via-ssh)
2. [via the HTTPS protocol](/git/clone-commit-via-http)
3. [Using the website](/git/clone-commit-via-web/)
n commented 12 months ago
Collaborator

We can link to the Install Git article here.
https://docs.codeberg.org/getting-started/install-git/

We can link to the `Install Git` article here. https://docs.codeberg.org/getting-started/install-git/
rwa marked this conversation as resolved
3. [Using the website](/git/clone-commit-via-web/)
Option 1 and 2 require a git client (CLI or GUI, your choice) installed on your local system.
n commented 12 months ago
Collaborator

This can be reworded to:
"We recommend using the SSH protocol to connect to Codeberg."

Also, let's link to English Wikipedia article instead.
https://en.wikipedia.org/wiki/Secure_Shell_Protocol

This can be reworded to: "We recommend using the SSH protocol to connect to Codeberg." Also, let's link to English Wikipedia article instead. https://en.wikipedia.org/wiki/Secure_Shell_Protocol
rwa marked this conversation as resolved
rwa added 1 commit 12 months ago
n commented 12 months ago
Collaborator

@rwa Welcome to Codeberg! Thank you for your participation and contributions to the Docs :)

@rwa Welcome to Codeberg! Thank you for your participation and contributions to the Docs :)
rwa requested review from n 12 months ago
n requested changes 12 months ago
content/home.md Outdated
<span class="wide-only">Please choose a section from the main menu on the left.</span>
<span class="narrow-only">Please choose a section from the main menu, which you can access by clicking/touching the three stripes at the top right.</span>
If you're new to Codeberg, consider reading the [Getting Started Guide](/getting-started).
n commented 12 months ago
Collaborator

Please remove the WIP line instead and restore the line with the Getting Started Guide.

Please remove the WIP line instead and restore the line with the Getting Started Guide.
rwa marked this conversation as resolved
> Enter a file in which to save the key (/c/Users/you/.ssh/id_rsa):[Press enter]
```
4. You will be asked for a passphrase, enter on if you like to or leave the prompt empty.
n commented 12 months ago
Collaborator

enter on --> enter one

`enter on` --> `enter one`
rwa marked this conversation as resolved
The private key part of your SSH key can be protected by a passphrase. This adds an additional layer of authentication which increases security. Be aware that this will only be helpful for certain attack scenarios and does not offer 100% protection. It is recommended to keep your private key safe and - well - private.
If you are using a passphrase-protected SSH key, the use of a ssh agent is strongly encouraged for improved usability. You need to enter the passphrase only once during a session.
n commented 12 months ago
Collaborator

I don't think we need to mention this here, since it's explained at the end under sub-heading Avoid re-typing the passphrase.

I don't think we need to mention this here, since it's explained at the end under sub-heading `Avoid re-typing the passphrase`.
rwa marked this conversation as resolved
If this is unexpected, please log in with password and setup Gitea under another user.
```
*Note: All codeberg users share a single unix user named `git` which is used to check out repositories. Depending on the key provided, permission is granted or denied. You can check out all repositories with your key which you have permission for. You can push code to all repositories where you have write access.*
n commented 12 months ago
Collaborator

codeberg --> Codeberg

`codeberg` --> `Codeberg`
rwa marked this conversation as resolved
If you are working at the command line, you can alternatively do this directly:
```shell
$ eval `ssh-agent`
n commented 12 months ago
Collaborator

Please change eval `ssh-agent` to eval $(ssh-agent). The back-tick is generally not recommended and can be mistaken for a quote.

Please change ``` eval `ssh-agent` ``` to ``` eval $(ssh-agent) ```. The back-tick is generally [not recommended](https://mywiki.wooledge.org/BashFAQ/082) and can be mistaken for a quote.
rwa marked this conversation as resolved
rwa added 1 commit 12 months ago
fnetX approved these changes 12 months ago
fnetX left a comment
Collaborator

Since some of the cosmetic changes are already unrelated to this PR (they existed in the docs before, probably came up because the diff of the SSH article was hard to compare 😉), I think this is fine to merge.
Thank you very much for improving this, thank you for fixing the tiny stuff, too. There is this one lowercase Git still mentioned (I marked the conversation as unresolved), and then we're good to go IMO.

Since some of the cosmetic changes are already unrelated to this PR (they existed in the docs before, probably came up because the diff of the SSH article was hard to compare 😉), I think this is fine to merge. Thank you very much for improving this, thank you for fixing the tiny stuff, too. There is this one lowercase Git still mentioned (I marked the conversation as unresolved), and then we're good to go IMO.
rwa added 1 commit 12 months ago
n approved these changes 12 months ago
n commented 12 months ago
Collaborator

Thanks for fixing all the little things. Sorry for making you fix unrelated parts 🙈.

Thanks for fixing all the little things. Sorry for making you fix unrelated parts 🙈.
fnetX merged commit 7df2b4c8eb into master 12 months ago

Reviewers

fnetX approved these changes 12 months ago
n approved these changes 12 months ago
The pull request has been merged as 7df2b4c8eb.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.