heig-vd-dai-course / .github

A special repository that sets the GitHub organization profile README.
0 stars 77 forks source link

Add myself (Lisa Gorgerat) to the list of students (#198) #201

Closed LisaGorgerat closed 1 month ago

LisaGorgerat commented 1 month ago

Fixes #198

LisaGorgerat commented 1 month ago

@ludelafo @hadrylouis

ludelafo commented 1 month ago

It seems your commits are not signed. Please sign them using the course material here: https://github.com/heig-vd-dai-course/heig-vd-dai-course/blob/main/03-git-github-and-markdown/COURSE_MATERIAL.md#sign-commits-with-ssh.

You can then resign them using the tip mentioned in the course material here: https://github.com/heig-vd-dai-course/heig-vd-dai-course/blob/main/03-git-github-and-markdown/COURSE_MATERIAL.md#make-changes-if-needed.

LisaGorgerat commented 1 month ago

i did the first part, but i have trouble for the second part. when i use the command, it give me this: image

ludelafo commented 1 month ago

It seems Git cannot find the secret key used to sign the commits.

Have you followed the official documentation here to tell Git about your key here https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key#telling-git-about-your-ssh-key?

More specifically, use the following commands to tell Git about your key:

# Sign the commits using the SSH key
git config --global gpg.format ssh

# Tell Git which key to use for signing
git config --global user.signingkey <path to your public SSH key>

The <path to your public SSH key> depends on your configuration. The keys are available in the ~/.ssh directory. You can then list all files in that directory with the following command:

# List all files in SSH directory
ls -la ~/.ssh

Then, using the right SSH key, tell Git about it with the following command:

# Tell Git which key to use for signing
git config --global user.signingkey ~/.ssh/id_ed25519.pub

Your Git configuration can be found in the ~/.gitconfig file:

# Display the Git configuration
cat ~/.gitconfig

If you have followed the course material, the output should be similar to this:

[user]
    email = ludovic.delafontaine@gmail.com
    name = Ludovic Delafontaine
    signingkey = /home/ludelafo/.ssh/id_ed25519
[gpg]
    format = ssh
[commit]
    gpgsign = true

Then you can try to rebase your commits again with the command git rebase --continue as stated in your screenshot.

Let me know if it worked for you!

ludelafo commented 1 month ago

Another point: it seems you aren't in the WSL environment but rather GitBash or something else (the screenshot you sent mentions MINGW64, which is not a WSL environment).

Please ensure you are in a WSL environment, it is mandatory to execute/install/manage all your projects in WSL.

LisaGorgerat commented 1 month ago

So, i had multiple problems, but now it should be good, because it said that it rebased successfully. I know that i should have been on wsl, but i made a mistake. The rest of what i did IS on wsl. I thought to at least fix what i did for this on my pc, but, if you want me to do it again on wsl, i can. However, even on wsl i have trouble with signing. for exemple, with the maven introduction: fail of sign2

ludelafo commented 1 month ago

Good news for the rebase!

The last step is to force push to the branch using the following command:

# As a rebase rewrites Git's history, a force push is required
git push --force

Then the commits on this PR should be updated.

Regarding your other problem, could you paste the content of your ~/.gitconfig configuration file? You can use cat ~/.gitconfig to display the file's content and copy-paste here.

We should be able to figure and fix your problem that way. :)

LisaGorgerat commented 1 month ago

So....I think i fixed it. I was able to push the maven project and the ios project. I checked and it says verified, which is when it's signed if i understood correctly. There was indeed a problem in the gitconfig, that i fixed and some stuff i apparently setup wrong, but i don't have error messages anymore and as i said before, i was able to push and it seems signed. :D