GIT: How to upload Rails project using GIT

I installed

- gem install git - sudo apt-get install git-core

- cd to folder where my application "demo" is - /home/ruby/ - git init - git status - git add . - git commit -m "First V" - git config --global user.name "Ali Imran" - git config --global user.email "ali@domain.com

now i am running

git push origin master

and getting error of host and port 22

how to fix this error.

Ali Imran wrote:

I installed

- gem install git - sudo apt-get install git-core

- cd to folder where my application "demo" is - /home/ruby/ - git init - git status - git add . - git commit -m "First V" - git config --global user.name "Ali Imran" - git config --global user.email "ali@domain.com

now i am running

git push origin master

and getting error of host and port 22

how to fix this error.

This is a Git issue, not a Rails issue. Please ask on a Git forum.

Best,

Ali Imran wrote:

I installed

- gem install git

Wow. I didn't even know there was a git gem. What is that some Ruby wrapper for Git? Very interesting. I'll have to look into what this is about.

- sudo apt-get install git-core

- cd to folder where my application "demo" is - /home/ruby/ - git init - git status - git add . - git commit -m "First V" - git config --global user.name "Ali Imran" - git config --global user.email "ali@domain.com

now i am running

git push origin master

You didn't list where you added the "origin" remote to your repository. Did you do that?

git remote show origin

What does that tell you about the remote named "origin?"

If you don't have an "origin" remote then add one with:

git remote add origin <url_to_repository>

and getting error of host and port 22

how to fix this error.

Git needs to know where to push to. A remote named "origin" should contain that information.

If you clone an exiting repository then Git will kindly add the "origin" remote for you, which points back to the original repository. But, if you create a new repository then there is no origin, which should be kind of obvious.

... meaning that if you just want to use Git on your own computer and not push to a "central" repository, you just use "git commit".

Yes i did the same thing through out

i have apache2 on ubuntu

when i run git push origin master

instead of

mysshid@256.256.256.256

it took me to for password

ali@256.256.256.256

here i am stuck

i look at the apache config and i set the globaluser name for git but it did not work

Ali Imran wrote:

i look at the apache config and i set the globaluser name for git but it did not work

I think you've gone completely off-topic at this point. You really need to take this to an appropriate Git forum.

Yes you are right, thanks