Skip to content

Commit

Permalink
add ssh key to agent
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Oct 13, 2023
1 parent a003f4a commit 5992ae4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions start.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,18 @@ def setup(self, _=None):
)
return
self.store_the_keys(*keys)

# Add the key to the ssh-agent.
self.add_key_to_ssh_agent()

self.output.value = "The keys were updated 👍"

def add_key_to_ssh_agent(self):
"""Add the key to the ssh-agent."""
subprocess.run(
["ssh-add", "-t", "1d", str(self.private_key_file)], encoding="utf-8", check=True,
)

def get_keys(self):
headers = {"Content-Type": "application/json", "Accept": "application/json"}

Expand Down

0 comments on commit 5992ae4

Please sign in to comment.