mikeizbicki / cmc-csci143

big data course materials
40 stars 76 forks source link

Git Clone Issue (CI HW) #386

Closed mmendiratta27 closed 9 months ago

mmendiratta27 commented 10 months ago

Hi! When I try to git clone the repository, I get a Permission denied error. The full command line input and subsequent output is below.

>> git clone git@github.com:mmendiratta27/continuous-integration.git
Cloning into 'continuous-integration'...
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.

I have cloned other repos from the lab this way and have not had any issues.

mikeizbicki commented 10 months ago

I recommend using the https link instead of the git link. The link you've used requires setting up some extra permissions which is a bit more complicated.

vvatermelon-dev commented 9 months ago

hi guys any solution for git clone always required me user and password

vitorvavolizza commented 9 months ago

If you set up the ssh keys and always clone via ssh instead of https you won't need to type your user and passwords.

You can do this by:

You need to do this from your lambda server!

1. Check if you already have ssh keys set up

Run ls -la ~/.ssh. If you don't see a file with the name id_ed25519 or id_ed25519.pub, you probably don't have them set up, so you can proceed to create them and follow the next steps.

2. Generate the ssh keys

Run ssh-keygen -t ed25519 -C "your_github_email@your_provider.com"

Press enter when it asks you about the file name and type in something secure for the passphrase.

3. Add the keys to the ssh agent

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

4. Add the SSH public key to github

Run vim ~/.ssh/id_ed25519.pub and copy everything on the file.

Open GitHub, click on your profile on the upper right and go to settings. Then click on SSH and GPG keys. After that, click on New SSH Key, give it a name like lambda server, paste the entire key, and click Add SSH Key.

5. Check if it was successful

Run ssh -T git@github.com, if you get Hi your_name! You've successfully authenticated, but GitHub does not provide shell access. you did it! Now, you can clone, push, etc via ssh without typing your username and password!

vvatermelon-dev commented 9 months ago

what i dont see any files.. imean what if it is empty πŸ™

vitorvavolizza commented 9 months ago

that means you can proceed to create them in step 2!

vvatermelon-dev commented 9 months ago

without

Thanks bro for helping me.. i made itπŸ˜ŠπŸ™

vvatermelon-dev commented 9 months ago

that means you can proceed to create them in step 2!

thanks broπŸ‘