Hey Surabhi,
The error message “Permission denied (publickey)” indicates that GitHub is rejecting your SSH authentication. Here’s how you can fix it:
Solution: Add SSH Key to GitHub
-
Check if you have an SSH key:
ls -al ~/.ssh
If you see files like
id_rsa
andid_rsa.pub
, you already have an SSH key. -
If you don’t have an SSH key, generate one:
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
- Press Enter to save it in the default location (
~/.ssh/id_rsa
). - Set a passphrase (optional).
- Press Enter to save it in the default location (
-
Add the SSH key to your GitHub account:
- Copy the public key to your clipboard:
cat ~/.ssh/id_rsa.pub
- Go to GitHub → Settings → SSH and GPG keys → New SSH Key.
- Paste the key and save.
- Copy the public key to your clipboard:
-
Test the SSH connection:
ssh -T git@github.com
If successful, you’ll see:
Hi username! You've successfully authenticated, but GitHub does not provide shell access.
-
Try cloning again:
git clone git@github.com:cloudxlab/python_iitr_feb2025.git
If you still face issues, let me know what error you get!
I have followed all steps . clone is done.below is all commands i have executed but can not see readme file in my root directory it looks like this. attached s
screen shot of commands and root directory
Hi Surabhi,
Please refer to https://discuss.cloudxlab.com/t/bad-file-descriptor-while-running-git-clone/8351 for this.