Issues pushing from Git Bash to GitHub during introduction to Github module

Hi,

I am currently doing the Introduction to GitHub module and having some issues pushing repositories to GitHub.

https://www.codecademy.com/paths/full-stack-engineer-career-path/tracks/fscp-git-and-github-part-i/modules/fecp-introduction-to-github/articles/getting-started-git-and-github

I have done git config for username and email (the same email I use with Github). Created a README.txt in git_practice within the C drive. I then go onto Github and reach the point of copying and pasting the below code:

git remote add origin https://github.com/PeteHai/git_practice.git
git branch -M main
git push -u origin main

following this I just get stuck on a cursor. If I try:
“git push -u origin main --verbose” then it just stays on “pushing to https etc”. At no point am I prompted to enter my user name and password.

Feeling a little lost

Hi, I just tried everything again just to check it works, so everything was fine for me, everything got pushed to my repo. So if you followed all the steps it should work. Have you done the Git setup before or is it the first time ?

Hi, thanks for the help! This is my first foray into Git and Github.

The only thing I can think of is maybe my computer has permissions which are causing a bit of a block? Where is the best place for me to have my git_practice repo? At the moment it is in my C drive.

It is frustrating that I don’t get an error message and everything seems to work fine, just an indefinite wait - I have to close Git Bash from that point

I understand, I did have some issues when I started using GIt. Well maybe try setting up your local repo on your desktop, make sure your working directory is your desktop, create a new directory name git_test for example and also a repo, follow the steps and see how it goes. Regarding your password maybe your credentials are already stored on your computer.

thanks again. I tried the same using a repo on the desktop. When linking to your Github email address, is it better to use the hotmail/gmail etc one linked to Github or the randomly generated one Github provides?

Its better to use yours, the one you used in your Github account because for sure you will be using this again in the future.

Hi,

I am trying to git add the README.txt file for the Git setup exercise.
I get a denial message (Mac) “warning: unable to access ‘/Users/gershoni/.config/git/attributes’: Permission denied”
I am not sure how to address that.
I added the terminal in my system preference security and privacy pane, and enabled terminal to access all my HD.Please advise. Thanks!

It sounds like a unix permissions error, there’s a decent intro here- Unix File Permissions - NERSC Documentation or you can search around for similar guidance.

You’ll probably want to find and change the permissions for the relevant files/directories. This could accidentally be owned by root or you might own the file but just have missing write permissions.

1 Like

Hi - I am still having issues with Git Bash just not really responding when I try to push to github. Could this also be a permissions issue?

1 Like

I don’t think that is the same issue. There seems to be a git for windows (provides gitbash) specific issue at present. I made a recent post that might be helpful for you-

Hello,

Thank you so much, I have now completed my first upload to Github. I used the first solution in your post and updated to the 26th June snapshot, so it looks like your theory of there being a bug is correct.

Interestingly, I was asked to login with my credentials via a separate box, not the terminal as I expected:

1 Like

Thank you so much for the suggested article, however I don’t have the skills to assess how to solve my issue after reading it. It assumes I have much more understanding than I really do.
As you suggested, I also consulted with Stack Overflow, and there I found several other suggestions to the same issue - with more specific instructions than in the atricle. My concern is that I cannot assess which of these is right in my case.

Could you please suggest which of these solutions would be the right one in my case?

Thank you so much!

Your issue is different to ones with gitbash. The article you linked provides a few solutions depending on the exact issue but it’s not entirely clear which issue you have. I’d assume it’s this one- Unable to access 'git/attributes' - Stack Overflow

If none of this makes any sense to you then I would highly suggest learning how to work with your shell. You’ll repeatedly hit roadblocks without any knowledge so it is a worthy investment of your time to get the basics down. CC do a course on bash that would provide you with a half decent basis or you can search around for similar things. But I would encourage you to spend some time on it.

1 Like

Thank you so much for your advice. I assume you mean that I should take a course on bash beyond Codecademy’s Command Line course. Just confirming that it’s so.
Many Thanks again for your guidance.

1 Like

I’d have thought the cc command line course provided enough background that the previous link to the unix file permissions page was clear. If not then, yes, you may want to look elsewhere. Permissions are important when you’re programming and there’s a good chance you’d be using some *nix based tools at some point or another.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.