From 007c787d5af065ad5e5d8a5a9239e0b4f15941b3 Mon Sep 17 00:00:00 2001 From: Yannick Date: Thu, 8 Aug 2024 11:25:16 +0200 Subject: [PATCH] added support for multi IP like local host file --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 57c1377..326c510 100644 --- a/main.py +++ b/main.py @@ -2,7 +2,8 @@ import subprocess import socket username = input("Hallo, wie lautet ihr Username? (Achte bitte auf Groß und Kleinschrift): ") -hostname = input(f"\nSuper, {username}. Jetzt bräuchte ich noch die Remote-adresse: ") +hostname = input(f"\nSuper, {username}. Jetzt bräuchte ich noch die Remote-adresse (NAS IP): ") +localhostname = input(f"\nJetzt bräuchte ich noch die Local-adresse (z.b aus Host datei): ") port= "22" port = input(f"\nStandartport {port} nutzen? (y/j/PORT-Nr) ") if port.lower() in ["ja","j","y"] or not port.isdigit(): @@ -66,6 +67,6 @@ else: print("Hier sind Hilfreiche Befehle:") print(f"\ncd share/Public/git/{project_name}") print("\ngit push origin master") - print(f'\ngit clone "ssh://yannick@192.168.2.106:{port}/share/Public/git/{project_name}.git"') + print(f'\ngit clone "ssh://{username}@{localhostname}:{port}/share/Public/git/{project_name}.git"') except subprocess.CalledProcessError as e: print(f"Leider ist da was Fehlgeschlagen: {e}")