{"id":16461846,"url":"https://github.com/jvc-byte/how-to-generate-and-add-ssh-key-to-github","last_synced_at":"2025-02-27T06:25:55.910Z","repository":{"id":252300882,"uuid":"840024724","full_name":"jvc-byte/How-to-generate-and-add-SSH-key-to-GitHub","owner":"jvc-byte","description":"Simple Steps to generate and add SSH key to your GitHub account","archived":false,"fork":false,"pushed_at":"2024-08-18T08:26:41.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-10T05:18:08.675Z","etag":null,"topics":["add-ssh-key","generate-ssh-key","ssh-key"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jvc-byte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-08T20:12:12.000Z","updated_at":"2024-08-18T08:26:44.000Z","dependencies_parsed_at":"2024-08-08T22:42:48.191Z","dependency_job_id":"bde6531d-3398-41c3-9add-8c9ef9264af2","html_url":"https://github.com/jvc-byte/How-to-generate-and-add-SSH-key-to-GitHub","commit_stats":null,"previous_names":["jvc-byte/how-to-generate-and-add-ssh-key-to-github"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvc-byte%2FHow-to-generate-and-add-SSH-key-to-GitHub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvc-byte%2FHow-to-generate-and-add-SSH-key-to-GitHub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvc-byte%2FHow-to-generate-and-add-SSH-key-to-GitHub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvc-byte%2FHow-to-generate-and-add-SSH-key-to-GitHub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jvc-byte","download_url":"https://codeload.github.com/jvc-byte/How-to-generate-and-add-SSH-key-to-GitHub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240988962,"owners_count":19889595,"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":["add-ssh-key","generate-ssh-key","ssh-key"],"created_at":"2024-10-11T11:09:38.491Z","updated_at":"2025-02-27T06:25:55.888Z","avatar_url":"https://github.com/jvc-byte.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# How-to-generate-and-add-SSH-key-to-GitHub (Linux CLI)\n\n## The below are verified steps to add SSH key to your GItHub account (Linux CLI):\n\n### 1. Check for Existing SSH Keys:\n```bash\nls -al ~/.ssh\n```\nThere should be files named `id_rsa` (private key) and `id_rsa.pub` (public key) or similarly named key pairs.\nIf there is no SSH key available you will receive a message like: `ls: cannot access '/c/Users/dell/.ssh': No such file or directory`\n### 2. Generate a New SSH Key (if there is no SSH available else skip No. 2)\n```bash\nssh-keygen -t rsa -b 4096 -C \"your_email@example.com\"\n```\nFollow the prompts properly to save the key, and you can press Enter to accept the default file location. When prompted for a passphrase, you can choose to set one or leave it empty by pressing Enter.\n### 3. Type the below command to add the SSH Key to the SSH Agent\n```bash\neval \"$(ssh-agent -s)\"\n```\n```bash\nssh-add ~/.ssh/id_rsa\n```\n### 4. Add Your SSH Key to Your GitHub Account\nCopy your SSH key to your clipboard:\n```bash\ncat ~/.ssh/id_rsa.pub\n```\nGo to [GitHub SSH settings](https://github.com/settings/keys), click \"New SSH key,\" paste your key, and save it.\n### 5. Test your SSH connection to GitHub:\n```bash\nssh -T git@github.com\n```\nYou should see a success message like:\n```\nHi username! You've successfully authenticated, but GitHub does not provide shell access.\n```\n### 6. Update the Remote URL.\nEnsure your repository's remote URL uses the correct SSH format. Run:\n```bash\ngit remote -v\n```\nIf it shows a URL starting with `https://`, update it to the SSH format:\n```bash\ngit remote set-url origin git@github.com:jekhokie/raspberry-noaa-v2.git\n```\n### 7. Try cloning the repository again:\n```bash\ngit clone git@github.com:jekhokie/raspberry-noaa-v2.git\n```\nThis will resolve the `Permission denied (publickey)` issue and successfully clone your repository via SSH.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvc-byte%2Fhow-to-generate-and-add-ssh-key-to-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjvc-byte%2Fhow-to-generate-and-add-ssh-key-to-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvc-byte%2Fhow-to-generate-and-add-ssh-key-to-github/lists"}