Skip to content

SabitOl/ssh-auto-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

The script generates SSH key needed to use SSH.

Run the script, follow the prompts, and complete your SSH setup with the below:

Add the key to GitHub

  • Go to GitHub.com
  • Click your profile picture (top right) → Settings
  • Click SSH and GPG keys (left sidebar)
  • Click New SSH key (green button)
  • Title: Give it a name like "My Laptop"
  • Key: Paste the key you copied
  • Click Add SSH key

To test if the connection works, run:

ssh -T git@github.com


You might see a warning about authenticity - type `yes` and press Enter.

You should see:

Hi SabitOl! You've successfully authenticated...
  • Change your remote to use SSH:
git remote set-url origin git@github.com:SabitOl/yourrepo.git
  • Verify it chenged:
git remote -v
git push -u origin main

NB: You might get an error here if your git is still using the old "master" - git push -u origin master. If getting error, change "main" to "master". Or run git branch -M main; then run git push -u origin main.

No password needed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages