cmc-csci143 icon indicating copy to clipboard operation
cmc-csci143 copied to clipboard

Git Clone Issue (CI HW)

Open mmendiratta27 opened this issue 1 year ago β€’ 7 comments

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 [email protected]:mmendiratta27/continuous-integration.git
Cloning into 'continuous-integration'...
[email protected]: 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.

mmendiratta27 avatar Jan 23 '24 07:01 mmendiratta27

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.

mikeizbicki avatar Jan 23 '24 16:01 mikeizbicki

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

vvatermelon-dev avatar Feb 03 '24 04:02 vvatermelon-dev

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 [email protected], 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!

vitorvavolizza avatar Feb 04 '24 20:02 vitorvavolizza

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

vvatermelon-dev avatar Feb 05 '24 19:02 vvatermelon-dev

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

vitorvavolizza avatar Feb 05 '24 19:02 vitorvavolizza

without

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

vvatermelon-dev avatar Feb 05 '24 19:02 vvatermelon-dev

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

thanks broπŸ‘

vvatermelon-dev avatar Feb 05 '24 19:02 vvatermelon-dev