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

Proof of Concept Deploy Key #14

Closed
chadlagore opened this issue Dec 9, 2017 · 0 comments
Closed

Proof of Concept Deploy Key #14

chadlagore opened this issue Dec 9, 2017 · 0 comments
Assignees
Labels
:cmd command line and clientside functionality
Milestone

Comments

@chadlagore
Copy link
Contributor

chadlagore commented Dec 9, 2017

As a result of calling inertia init <vps_ip> <github_repo> (locally), at least the following steps should take place:

  1. Inertia gets installed on the VPS.
  2. Create a key pair locally.
  3. Show the public key to the user (they copy-pasta to GitHub).
  4. Pipe the pem file to the VPS ssh <vps_ip> 'bash -c' < inerta set-key <key> <repo>.
  5. Show the webhook url to the user locally (they copy-pasta to GitHub.

OR, if we opt to call inertia init on the VPS kill step 3 and replace step 0 with ssh <vps_ip>:

Example:

$> inertia init <vps_ip> <github_repo>

😏 Your new inertia public deploy key (add it here https://github.com/<user>/<repo>/settings/keys/new):
ssh-rsa AAAAB3NzaC1yc2EAA...

Enter VPS SSH password: *****************

🎉 Your new inertia GitHub webhook URL (add it here https://github.com/<user>/<repo>/settings/hooks/new):
https://<vps_ip>:8888

$>

Note: (2) can actually be done with:

curl -kX POST -u <user> https://api.github.com/repos/<user>/<repository>/keys \
    -d '{
    "key": "<public-key>", 
    "read_only": true, 
    "title": "inertia"
}'

# Prompts for GitHub password :(

but then the user has to login to github via inertia, which seems bad - but might be OK? This can be done with OAuth too, but is OAuth in scope for MVP?

@chadlagore chadlagore self-assigned this Dec 9, 2017
@chadlagore chadlagore added the :cmd command line and clientside functionality label Dec 9, 2017
This was referenced Dec 10, 2017
chadlagore added a commit that referenced this issue Dec 10, 2017
@chadlagore chadlagore added this to the V0.0.1 milestone Jan 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:cmd command line and clientside functionality
Projects
None yet
Development

No branches or pull requests

1 participant