Skip to content

add ssh-add -K #1420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,17 @@ Example of `~/.ungitrc` configuration file to change default port and enable bug
}
```


SSH Authentication
-----------------
Ungit does run git commands in background and authentication will be asked continously when working with private repos. Easiest way to prevent this is to set up ssh authorization and cache it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Fix typo.
  2. "authorization" -> "authentication" (see above
Suggested change
Ungit does run git commands in background and authentication will be asked continously when working with private repos. Easiest way to prevent this is to set up ssh authorization and cache it.
Ungit does run git commands in background and authentication will be asked continuously when working with private repos. Easiest way to prevent this is to set up ssh authentication and cache it.


1. Follow github's [instruction](https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Correctly capitalize GitHub
  2. Remove language from URL to default to user language
Suggested change
1. Follow github's [instruction](https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
1. Follow GitHub's [instructions](https://docs.github.com/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)

2. Ensure `ssh-add -K ~/.ssh/id_rsa` or with whatever ssh key file name is executed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not covered by the instructions linked above?

Additionally, it seems that the -K option only applies to (most) macs:
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is covered, but not always followed, which is why I would like to ensure.

As far as -K being only for mac only I didn't know about. Maybe it be better to change to more targeted ssh-add



PGP
---
----
[Git](https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work) and [github](https://help.github.com/articles/signing-commits-using-gpg/) both supports PGP signing. Within Ungit these features can be enabled via doing either one of the below two actions.

- `git config --global commit.gpgsign true` (or without `--global` at the repo)
Expand Down Expand Up @@ -130,6 +139,7 @@ Known issues
* Debian Wheezy's supported git and nodejs packages are too old, therefore download newest [git](https://github.com/git/git/releases) and [nodejs](https://nodejs.org/download/) tarballs and [build from source](https://www.control-escape.com/linux/lx-swinstall-tar.html).
* Adblocker may block Ungit! Some ad blockers, such as [Adblock plus](https://adblockplus.org) and [uBlock](https://www.ublock.org/), don't like localhost api calls and assume that it is a cross domain attack. Please whitelist `{localhost|127.0.0.1|$UngitURL}:{ungit port number}`. [#887](https://github.com/FredrikNoren/ungit/issues/887) [#892](https://github.com/FredrikNoren/ungit/issues/892)
* Running git in non English language will result in unexpected behavior! Ungit parses git command results in English to detect repos' states and this causes confusion when git results are not in English. [#959](https://github.com/FredrikNoren/ungit/issues/959)
* Ungit does make frequent git requests and may ask for credentials frequently. To fix this, please follow the SSH instructions above.

Changelog
---------
Expand Down