dolmen / github-keygen

Easy creation of secure SSH configuration for your GitHub account(s)
GNU General Public License v3.0
245 stars 25 forks source link

brand new config, #56

Closed ChristopherA closed 9 months ago

ChristopherA commented 9 months ago

I've installed via brew install github-keygen.

I then rm ~/.ssh/config

My existing GitHub auth key path is ~/.ssh/auth_id_ed25519_christophera@github

Then I run github-keygen christophera -i auth_id_ed25519_christophera@github

Accounts: christophera
Saving GitHub hosts authentication keys in ~/.ssh/known_hosts_github...
Saving ~/.ssh/config...
…(my config)
Done.

The public key ~/.ssh/auth_id_ed25519_christophera@github.pub for christophera has been copied to the clipboard.
Paste it in your SSH settings at <https://github.com/settings/keys>.

However, when I do a git init in an empty directory, I get:

fatal: bad config line 4 in file /Users/christophera/.gitconfig

My first 10 lines of config is:

# -- github-keygen - begin --
# Version: 1.306

Host gist.github.com *.gist.github.com
HostName gist.github.com

# See https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port
Host ssh.github.com *.ssh.github.com 443.github.com *.443.github.com
HostName ssh.github.com
Port 443
ChristopherA commented 9 months ago

Damn it, my fault, wasn't reading the error - the error is in .gitconfig.