diff --git a/start.py b/start.py index 408b43b..b80d796 100644 --- a/start.py +++ b/start.py @@ -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"}