Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Build a Simple Ruby on Rails Application Getting Started with Rails Push to GitHub

Problem Pushing to Github

When I am trying to Push to Github I introduce

git push -u origin master
Username: (my username)
Password: (my password)

And then I receive this message: fatal: write error: Invalid argument fatal: read error: Bad file descriptor

Could you please help?? thanks in advance :-)

5 Answers

Chris Dziewa
Chris Dziewa
17,781 Points

Did you use git init followed by git remote add origin https://github.com/yourusername/yourprojectname.git followed by git add . followed by git commit -m "Your message about the commit here" after you went to github to create a repository?

Hello Chris,

I have tried to do again several times but it always respond the same error message. Everytime I tried I started from scratch deleting the .git folder in order to follow steps strictly but nothing works.

Just to make sure this issue is not related to folders, I have rewatched the lecture video again and again to make sure the folder where I am supposed to work on (the specific created for the app - in my case named "blog"). Actually Railsinstaller created a folder named SITES, and it contained a default folder inside named "todo" and during the first steps of this Rails course, I created a new one named "blog" that is the one I am working on. C://Sites/blog C://Sites/todo

I really do not know what to do and in order to not been stucked, I will try to keep working on the following lessons and solve this issue later. I am still a very beginner and if I understood the point of Github here is to backup the project, so I will keep working if it's possible.

Thank you in advance!!! :-)

Chris Dziewa
Chris Dziewa
17,781 Points

Hugo Yelo

What output do you get when you type git remote ? Also, if you head over to Code School, there is a free try Git course which is a quick intro that may be helpful for dealing with your Rails application.

Hello Chris,

When I type "git remote", I see "origin". It's correct, right?

I will keep going and check also the Git course from CodeSchool that you just recommend.

Thanks in advance.

Chris Dziewa
Chris Dziewa
17,781 Points

What about when you do git remote show origin?

Chris Dziewa
Chris Dziewa
17,781 Points

And when you run git status is there is anything to commit? Also check git log to make sure you have any commits completed. Have you configured your name and email in the terminal for your git account?