Skip to content
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

Automate the Github SSH Key Setup #79

Closed
christophstockinger opened this issue Mar 12, 2022 · 6 comments
Closed

Automate the Github SSH Key Setup #79

christophstockinger opened this issue Mar 12, 2022 · 6 comments

Comments

@christophstockinger
Copy link

Hi @driesvints

I am currently dealing with dotfiles to set up my MacBook. I stumbled across your repo and would like a tip to automate the setup of the Github SSH key.

Maybe it makes sense to work with the Github CLI, which adds the SSH key automatically with a command.

Of course, you would have to install Homebrew beforehand and then log in via the Github CLI.

Checkout:

Otherwise great work and really helpful.

@driesvints
Copy link
Owner

Hey @christophstockinger, that's perhaps an interesting idea indeed! I think I might be able to fiddle this into the fresh.sh script. Thanks for the idea!

@MichaelDeBoey
Copy link
Contributor

@driesvints Having this in fresh.sh would mean you'll need your password before 1Password is installed.

You also still need to add the manually, as it's required to clone the .dotfiles repo (see step 2 & 3 of "Setting up your Mac")

@driesvints
Copy link
Owner

@MichaelDeBoey but that's already the case with the current steps as step 2 requires your GitHub password to add the key to you github account. You'll always need to access this through another device like your phone.

@driesvints
Copy link
Owner

@MichaelDeBoey your second remark is true. Bit of a chicken or the egg tale here. We'd need to repo on our Mac to run the fresh installation but we'd need to add the SSH key beforehand to use the git protocol. So I'm afraid we can't do the above @christophstockinger.

@christophstockinger
Copy link
Author

Hi @driesvints
I just took the time to look at the problem from you again.

In my opinion it is possible: For the login process you need a PAT to log in to the Github CLI. Of course I don't have it on my PC and have to add it manually, but I have to do the same with my email address for the SSH key.

Gladly I can make a PR and you can have a look at it.

@driesvints
Copy link
Owner

@christophstockinger sure, feel free to try a PR and we'll see from there 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants