{"id":16607436,"url":"https://github.com/dimon222/py-gitsshgen","last_synced_at":"2025-10-29T16:30:32.572Z","repository":{"id":57434833,"uuid":"234989481","full_name":"dimon222/py-gitsshgen","owner":"dimon222","description":"Automatic generation of SSH keys for VCS","archived":false,"fork":false,"pushed_at":"2020-06-10T19:09:54.000Z","size":34,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-10T09:21:52.784Z","etag":null,"topics":["automation","git","hacktoberfest","python","security","ssh","vcs"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimon222.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-20T00:34:05.000Z","updated_at":"2022-10-02T15:45:12.000Z","dependencies_parsed_at":"2022-08-27T21:11:49.540Z","dependency_job_id":null,"html_url":"https://github.com/dimon222/py-gitsshgen","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimon222%2Fpy-gitsshgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimon222%2Fpy-gitsshgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimon222%2Fpy-gitsshgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimon222%2Fpy-gitsshgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimon222","download_url":"https://codeload.github.com/dimon222/py-gitsshgen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219857520,"owners_count":16556061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","git","hacktoberfest","python","security","ssh","vcs"],"created_at":"2024-10-12T01:13:40.803Z","updated_at":"2025-10-29T16:30:27.254Z","avatar_url":"https://github.com/dimon222.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# py-gitsshgen\nAutomatic generation of SSH keys for VCS\n\n## Why?\nI was incredibly tired of doing the same procedure over and over for dozens of different VCS hosted in cloud and on-prem. There was no full-pledge solution offered even in `hub` and `lab` for end-to-end setup of SSH key for login to Git across different platforms.\n\n## How to use?\nThe script generates OpenSSH keypair and pushes public key to VCS using PAT (Personal Access Token) or App Password (Bitbucket only). The private key automatically goes to `~/.ssh/{name}.pem` + reference to it is appended to `~/.ssh/config` for automatic pickup by Git with OpenSSH configuration. The setup is assumed OpenSSH always.\n\nSupported parameters for key generation - https://asyncssh.readthedocs.io/en/latest/api.html#asyncssh.generate_private_key   \nSupported parameters for private key export - https://asyncssh.readthedocs.io/en/latest/api.html#asyncssh.SSHKey.export_private_key\n\nDefault settings:\n* Algo for generation - ssh-ed25519\n* No passphrase\n* Output private key with cipher AES256 with SHA256 hashing and 128 rounds of bcrypt.\n\nYou can install it using pip  \n`pip install gitsshgen`\n\nAll actions are done interactively in terminal:  \n```\nusage: gitsshgen [-h] [-t T] [-api API_URL] [-n N] [-a ALGO] [-ks KEY_SIZE] [-e EXPONENT] [-p PASSPHRASE] [-c CIPHER] [-r ROUNDS] [-hn HASH_NAME] [-sl SSH_LABEL]\n                 {github,gitlab,bitbucket,gogs,gitea} url u\n\npositional arguments:\n  {github,gitlab,bitbucket,gogs,gitea}\n                        instance type\n  url                   instance url\n  u                     instance username\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -t T                  personal application token\n  -api API_URL          API URL endpoint\n  -n N, --name N        name for private key\n  -a ALGO, --algorithm ALGO\n                        algorithm for keypair (default is ssh-ed25519)\n  -ks KEY_SIZE, --key-size KEY_SIZE\n                        key size (only for RSA)\n  -e EXPONENT, --exponent EXPONENT\n                        exponent (only for RSA)\n  -p PASSPHRASE, --passphrase PASSPHRASE\n                        passphrase for OpenSSH key (default is None)\n  -c CIPHER, --cipher CIPHER\n                        cipher for OpenSSH key (default is aes256)\n  -r ROUNDS, --rounds ROUNDS\n                        rounds for OpenSSH key (default is 128)\n  -hn HASH_NAME, --hash-name HASH_NAME\n                        hash name for OpenSSH key (default is sha256)\n  -sl SSH_LABEL, --ssh-label SSH_LABEL\n                        ssh label in VCS\n```\n\nExample with token:  \n`gitsshgen bitbucket bitbucket.org testusername -t testtoken`\n\nIf you don't provide token, script will open browser on page where you can make one, and ask you to enter it.  \n`gitsshgen bitbucket bitbucket.org testusername`\n\n### VCS Compatibility\n1. Github\n2. Gitlab\n3. Gogs\n4. Bitbucket\n5. Gitea\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimon222%2Fpy-gitsshgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimon222%2Fpy-gitsshgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimon222%2Fpy-gitsshgen/lists"}