One of the biggest and most frustrating struggles I had while working on Assignment 2 was before I had even started the assignment. I was having trouble with step 1, cloning my repository from GitHub into my desktop. After typing in the git clone command for my repository, I was prompted to input a username and password. I originally thought my GitHub account username and password would work but after some googling, I found that I needed to make create a key called a “personal access token”. It is essentially an alternative way to log in as opposed to using a password. It’s unique to my account and it can be used for accessing items on GitHub. After hours of trying to make the “personal access token”, I thought it would be best to access my professor for help with bypassing the password. After meeting with my professor, he was able to create an SSH key for me so I could clone my repository that way. Finally, I had access to my repository but there was another problem not long after.
My second major problem was also in Task 1. After adding a simple print statement into Main.java and doing “git add .” as well as a git commit, I was unable to do the final step which is git push. I kept receiving a message saying I didn’t have permission to access the repository. I thought everything was resolved after changing the access URL to SSH, but unfortunately, I was wrong. After trying many different solutions I found online with no success, I decided to contact my professor again. I was told that my remote address was incorrect, so I had to delete the one I currently had (https) and add the SSH remote address.
Next, I had a problem in Task 6 which was about recovering the file I had deleted in Task 5. I knew I had to use git revert since it was stated in the hint given to use. After going back over the slideshow shown in class, I saw I had to do “git revert ”. At first, I was trying to input the command I had used to delete the file, but it just wasn’t working. I did a little more research on how to recover a deleted file, but I kept reading about “git reset”. I knew this was the incorrect way and after many different searches, I was finally able to find a detailed article about git revert. In the article, one of the instructions was using “git log” to retrieve the commit ID to use with git revert. I then realized that “” was referring to the commit ID and not the command that was used to delete the file. After completing this step, I finally fully finished Task 1.
In conclusion, since GitHub and GitKraken are all new to me, I had a lot of trouble getting started when it came to using all the different commands. With a lot of help from my professor and some additional research online as well as going back to rewatch parts of the lecture, I was able to overcome the rough start on assignment 2.
Top comments (0)