ls -al ~/.ssh# Start agent:
eval "$(ssh-agent -s)"
# Add your key:
ssh-add ~/.ssh/id_ed25519
# Now verify:
ssh-add -l# Copy your public key:
cat ~/.ssh/id_ed25519.pubCopy the whole output and paste it into:
- Bitbucket → Profile → Personal settings → SSH keys → Add key Make sure:
- You didn’t paste the private key
(id_ed25519)No extra spaces or line breaks
ssh -T git@bitbucket.orgssh-keygen -t ed25519 -b 4096 -C "{username@emaildomain.com}" -f ~/.ssh/{ssh-key-name}
# Example
ssh-keygen -t ed25519 -b 4096 -C "username@emaildomain.com" -f ~/.ssh/id_ed25519{username@emaildomain.com}is the email address associated with the Bitbucket Cloud account, such as your work email account.{ssh-key-name}is the output filename for the keys. We recommend using a identifiable name such asbitbucket_work.
# This gives detailed debugging info
ssh -vvv git@bitbucket.org
# If want to add key manually
ssh-add ~/.ssh/private_keyname
# And check by:
ssh-add -l# Step 1: Generate ONE key pair:
ssh-keygen -t ed25519 -C "your_email@example.com"
# Press Enter to accept default location (~/.ssh/id_ed25519).
# Step 2: Add public key to GitHub:
cat ~/.ssh/id_ed25519.pub
## Copy output → GitHub Settings → SSH and GPG Keys → New SSH Key → Paste → Save
# Step 3: Test connection:
ssh -T git@github.com
# Should output:
# Hi username! You've successfully authenticated...NOTE: For below kind of error sometimes sudo could be your biggest enemy, so try with/without that too!
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.