Unable to clone github repo to my local IDE #168127
-
Select Topic AreaQuestion BodyI am trying to clone one of the repo from my github acount to my local STS and it is prompting for username and password. I have tried providing my login username and password but it does not work. Can someone please help me understand what username and password is needed here? Thanks!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hey! This is a common issue, and it happens because GitHub no longer accepts account passwords for Git operations over HTTPS. You have two main options: use a Personal Access Token (PAT) or switch to SSH. Option 1: Use a Personal Access Token (PAT) Steps:
Also, Save your credentials using Git’s credential manager so you don’t need to enter them every time. Option 2: Use SSH (No Password Needed) Steps:
ssh-keygen -t ed25519 -C "your_email@example.com"
cat ~/.ssh/id_ed25519.pub
Use the SSH URL (e.g., git@github.com:yourusername/repo.git) instead of HTTPS. Now try cloning again, I guess it'll work. |
Beta Was this translation helpful? Give feedback.
Hey! This is a common issue, and it happens because GitHub no longer accepts account passwords for Git operations over HTTPS.
You have two main options: use a Personal Access Token (PAT) or switch to SSH.
Option 1: Use a Personal Access Token (PAT)
Instead of your GitHub password, you need to use a Personal Access Token when prompted.
Steps:
Go to: https://github.com/settings/tokens
Click “Generate new token” → choose "Classic" or "Fine-grained token"
Add a name, set expiration, and enable scopes like:
Click Generate token and copy it (you won’t be able to see it again).
Now go back to STS and clone your repo: