Expand my Community achievements bar.

SOLVED

Error cloneing the aem-guides-wknd repository

Avatar

Level 8

Hi all,

 

I am going through WKND Tutorial and encountered an issue executing "git clone" 

Command, taken right from Tutorial. Namely:

  $git clone git@github.com:adobe/aem-guides-wknd.git
  Error manifestation is:

  Permission denied (publickey).
  fatal: Could not read from remote repository.

 

I saw an already closed previous post: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/quot-git-clone-quot-for-wk...

 

I want to Generate a new SSH key on my Windows laptop.

I am completely new to GIT and SSH.

 

ssh-keygen -t ed25519 -C "your_email@example.com"

What email id shall I use here for Adobe WKND tutorials?

 

If someone guides me with all steps for creating ssh key and adding it to GIT/SSH Agent, specifically for Adobe WKND tutorials, it helps me a lot.

 

Appreciate all your responses.

 

Thanks,

RK.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @nsvsrk ,

Yes both HTTPS and SSH are protocols for connecting to Git repositories on platforms like GitHub, GitLab, or Bitbucket. Here’s a clear comparison to help you understand when to use HTTPS vs SSH, especially as you're just starting out with Git.

When to Use Each

Use HTTPS if:

  - You're new to Git/GitHub.

  - You just want to clone/read a repository (like for WKND tutorial).

  - You don't want to generate SSH keys yet.

  - You're using a shared or temporary system.

Example:

git clone https://github.com/adobe/aem-guides-wknd.git

 

Use SSH if:

  - You're contributing to projects regularly.

  - You want a password-less, secure, fast connection.

  - You're comfortable managing SSH keys.

  - You use GitHub 2FA and want a smoother push/pull experience.

Example:

git clone git@github.com:adobe/aem-guides-wknd.git

 

So,

  - You're a beginner or just want to clone => Use HTTPS
  - You're pushing regularly and want better security => Use SSH

  - You can switch later anytime Git lets you change the remote URL with:

git remote set-url origin <new-url>

 

HTTPS vs SSH – Simple Explanation

Setup:
HTTPS requires no initial setup and works out of the box.
SSH requires generating an SSH key and adding it to your GitHub account.

Authentication:
HTTPS uses your GitHub username and password or a personal access token.
SSH uses a pair of public and private keys for authentication — no password needed.

Ease of Use:
HTTPS is easier for beginners to get started with.
SSH has a slightly more complex setup, especially for those new to Git.

Security:
HTTPS is secure and supports two-factor authentication (2FA).
SSH is even more secure, as it relies on encrypted key pairs.

Best Use Case:
HTTPS is ideal for beginners or for simply cloning repositories.
SSH is better suited for developers who regularly push and pull code.

2FA Compatibility:
With HTTPS, 2FA requires you to use a personal access token.
SSH works seamlessly with 2FA — no extra steps needed once set up.

Speed:
HTTPS may feel slightly slower due to repeated authentication.
SSH offers faster, password-less access after the initial setup.

Regards,
Amit

 

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @nsvsrk 

 

You can use below approach to clone the repository if there is an error with generating SSH key

 

Using Https : 

 

$ git clone https://github.com/adobe/aem-guides-wknd.git

 

If you want to clone using SSH key you have to follow steps mentioned in below link and generate SSH key to your github account (Use your github account email )

 

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your...

 

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and...

 

Hope this helps 

 

THanks

 

 

Avatar

Community Advisor

Hi @nsvsrk ,

Use HTTPS instead of SSH

If you're new to Git and don’t want to deal with SSH keys right now, just use:

git clone https://github.com/adobe/aem-guides-wknd.git

This always works unless you have GitHub 2FA and push access (which is not required for WKND tutorials).

 

If You Still Want to Use SSH

Follow these exact steps to generate an SSH key and link it to your GitHub account:

Step 1: Generate SSH Key

Open Git Bash (on Windows), then run:

ssh-keygen -t ed25519 -C "your_email@example.com"

Replace your_email@example.com with your GitHub email (not Adobe email).

Example

ssh-keygen -t ed25519 -C "rk123@gmail.com"

Then press Enter for all prompts to use defaults. It generates:

  - Private key: ~/.ssh/id_ed25519

  - Public key: ~/.ssh/id_ed25519.pub

 

Step 2: Start SSH Agent and Add Key

Still in Git Bash:

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

Step 3: Copy the Public Key

clip < ~/.ssh/id_ed25519.pub

This copies the public key to your clipboard.

 

Step 4: Add SSH Key to GitHub

Go to: https://github.com/settings/keys

Click “New SSH key”

Paste the copied key

Give it a title (e.g., MyLaptop)

Click Add SSH key

 

Step 5: Test the Connection

ssh -T git@github.com

You should see:

Hi yourusername! You've successfully authenticated...

Step 6: Clone Using SSH

Now this will work:

git clone git@github.com:adobe/aem-guides-wknd.git

 
Regards,
Amit

Avatar

Level 8

Thanks Amit.

 

Yes. I am new to GIT.

 

Why these two? HTTPS and SSH?

Is SSH also a protocol like HTTPS?

 

When to use what and pros and cons?

 

Thanks,

RK.

Avatar

Correct answer by
Community Advisor

Hi @nsvsrk ,

Yes both HTTPS and SSH are protocols for connecting to Git repositories on platforms like GitHub, GitLab, or Bitbucket. Here’s a clear comparison to help you understand when to use HTTPS vs SSH, especially as you're just starting out with Git.

When to Use Each

Use HTTPS if:

  - You're new to Git/GitHub.

  - You just want to clone/read a repository (like for WKND tutorial).

  - You don't want to generate SSH keys yet.

  - You're using a shared or temporary system.

Example:

git clone https://github.com/adobe/aem-guides-wknd.git

 

Use SSH if:

  - You're contributing to projects regularly.

  - You want a password-less, secure, fast connection.

  - You're comfortable managing SSH keys.

  - You use GitHub 2FA and want a smoother push/pull experience.

Example:

git clone git@github.com:adobe/aem-guides-wknd.git

 

So,

  - You're a beginner or just want to clone => Use HTTPS
  - You're pushing regularly and want better security => Use SSH

  - You can switch later anytime Git lets you change the remote URL with:

git remote set-url origin <new-url>

 

HTTPS vs SSH – Simple Explanation

Setup:
HTTPS requires no initial setup and works out of the box.
SSH requires generating an SSH key and adding it to your GitHub account.

Authentication:
HTTPS uses your GitHub username and password or a personal access token.
SSH uses a pair of public and private keys for authentication — no password needed.

Ease of Use:
HTTPS is easier for beginners to get started with.
SSH has a slightly more complex setup, especially for those new to Git.

Security:
HTTPS is secure and supports two-factor authentication (2FA).
SSH is even more secure, as it relies on encrypted key pairs.

Best Use Case:
HTTPS is ideal for beginners or for simply cloning repositories.
SSH is better suited for developers who regularly push and pull code.

2FA Compatibility:
With HTTPS, 2FA requires you to use a personal access token.
SSH works seamlessly with 2FA — no extra steps needed once set up.

Speed:
HTTPS may feel slightly slower due to repeated authentication.
SSH offers faster, password-less access after the initial setup.

Regards,
Amit