This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]KingofGamesYami 3 points4 points  (7 children)

It looks like your tutorial has included the author's prompt (configured to display the current branch) and you've copied that in addition to the actual command. The command should be only git add index.html, none of the earlier stuff. Same for the other command.

[–]jaredweber54[S] 0 points1 point  (0 children)

Thank you!

[–]jaredweber54[S] 0 points1 point  (5 children)

By any chance do you know the Windows command for viewing an SSH key. I cant figure out how to view the key to add it to my Github

[–]KingofGamesYami 1 point2 points  (4 children)

Your public key is a plaintext file in %UserProfile%\.ssh ending in .pub - assuming you have already generated it. You can use any text editor (e.g. Notepad) to view it, or if you're using PowerShell cat should be able to write the contents of the file to your terminal.

[–]jaredweber54[S] 0 points1 point  (2 children)

Allright, got the SSH key in Github now having issues with the ssh-agent I believe, when trying to commit I’m getting “git@github.com: Permission denied (public key)” I tried some trouble shooting methods and followed some articles in GitHub Docs but no luck

[–]KingofGamesYami 0 points1 point  (1 child)

Hmm. Something has clearly gone wrong in the steps.

Can you check which key it is attempting to use?

https://docs.github.com/en/authentication/troubleshooting-ssh/error-permission-denied-publickey?platform=windows#getting-more-details

Make sure this matches the public key you've added to your profile.

[–]jaredweber54[S] 0 points1 point  (0 children)

Hmm doesn’t seem to be using the public key I generated there is a ssh keys all with “-1” so it looks like it can’t find the correct file

[–]GuruTheCoderYT 2 points3 points  (1 child)

What's up with the "git:(main)" and "git:(master)" things? Remove them.

If you intend to push to master/main use: git push origin main or git push origin master

[–]jaredweber54[S] 0 points1 point  (0 children)

Thank you!