1

I just created a new github account and then installed GitHub on my Windows 7.

I tried to use my comand line but when I type git says

git is not recognized as an internal or external command.

I checked the PATH and it is C:\Users\me\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff3I can find a cmd folder in that path.

But, anyway, to avoid the hash I started using Git Shell. When I try to do git push I get

Warning: Permanently added 'github.com,192.30.252.128' (RSA) to the list of know n hosts. ERROR: Repository not found. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 

I authenticated to gitHub. I also generated SSH keys but when I tried to add it to the SSH keys in my account in gitHub.com I got Key is already in use.

So, I have no clue what is going on. I did my best, please help me.

Thanks

4
  • Do you have a git remote? If not, learn how to here. Commented Jan 20, 2016 at 23:17
  • @intboolstring I did git remote add origin https://github.com/me/myproj.git and I get fatal: remote origin already exists. Commented Jan 20, 2016 at 23:24
  • Try running git branch -a -vv (and tell me the result) Commented Jan 20, 2016 at 23:58
  • Your github account is not authenticated by ssh key as suggested by your remote url .You are using password authentication. Commented Jan 21, 2016 at 5:13

4 Answers 4

1

Did you add the local folder into the git environment so as to enable it to know where to push it?

normally you would:

next steps depend on whether you have code you want to store in a fresh repo online or to pull a repo.

Pull is:

  • git pull origin master

push would be:

  • git add .
  • git commit -m "Original Commit"
  • git push origin master
Sign up to request clarification or add additional context in comments.

4 Comments

I did git clone https://github.com/me/myproj.git instead of git remote add origin https://github.com/user/repo.git
Now if I do git remote add origin https://github.com/me/myproj.git I get fatal: remote origin already exists.
git clone by default add remote to your app.You don't need to add it manually after clone
0

git clone by default add remote to your app.You don't need to add it manually after clone

git remote add origin git_url 

Here origin is just work as a alias for url. You can name it whatever you want. This is used for mapping application to github.It works as a address. By default through git clone this address is added to your application. To check if remote is added to your application you can use

git remote -v 

Also you can add multiple remote to single application ex. github and heroku both need different url to push code. In this

git remote add origin git_url git remote add heroku (heroku_url or git_url) 

When we add heroku and git to application and run

git remote -v 

It show two remote url Also If remote url starts with https refer to password authentication else ssh authentication.

Comments

0

Thank you all for your time. What I did wasn first I uninstalled everything.

Then

Create a new account in gitgub.com

Download and install the github for desktop

On github desktop logout and login again with the username/password that you used at github.com (see here)

Go to github.com, to your accoun, copy your normal email (gmail) and paste it in github desktop to “configure git”, paste it over the “nonreply git mail” (see here)

Open Git Shell, hit

git config --global user.name "YOUR NAME"

and

git config --global user.email "YOUR EMAIL ADDRESS"

for configing username/email (see here)

Now works in Git Shell

Comments

0

i had the same problem, my advise is to type "git remote set-url origin https://github.com/username/reponame" before "git push origin master"

1 Comment

Avoid link only answers. Try to include why you think the linked resource answers the question in addition to the link in case the page contents change over time or the page becomes unreachable in future.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.