Add timestamp to ssh key title, forgejo doesn't like duplicates

fixes2
Vadim vtroshchinskiy 2024-11-26 12:42:50 +01:00
parent ae2d267e4c
commit 30fccad54d
1 changed files with 4 additions and 1 deletions

View File

@ -27,6 +27,7 @@ import time
import requests import requests
import tempfile import tempfile
import hashlib import hashlib
import datetime
#FORGEJO_VERSION="8.0.3" #FORGEJO_VERSION="8.0.3"
FORGEJO_VERSION="9.0.0" FORGEJO_VERSION="9.0.0"
@ -463,7 +464,9 @@ class OpengnsysGitInstaller:
self.__logger.info("Updated initrd %s", client_initrd_path) self.__logger.info("Updated initrd %s", client_initrd_path)
self.add_forgejo_sshkey(oglive_public_key, "Key for " + ogclient) timestamp = '{:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now())
self.add_forgejo_sshkey(oglive_public_key, f"Key for {ogclient} ({timestamp})")
def install(self): def install(self):
"""Instalar """Instalar