1

When I am using the command git push -u origin master, I get the error

Permission denied (publickey)
fatal: Could not read from remote repository

Please make sure you have the correct access rights
and the repository exists.

I am using Windows 10.

I guess I am not logged in correctly.

I have seen the answer at GIT push: permission denied (public key), but I cannot use the command ssh. I guess it is because I am on a Windows machine.

Besides, Github says that https is recommended in favor of using ssh.

Community
  • 1
  • 1
Jamgreen
  • 10,329
  • 29
  • 113
  • 224

2 Answers2

2

If you are using Windows machine , then there is an extension called

git extension

Once you download, then you have to make your ssh file to push or pull from git server using git extension.

You can create your SSH file in your git server account. After that you can try this using git extension

Dharani Dharan
  • 624
  • 1
  • 7
  • 18
  • I get the error `git: 'extension' is not a git command. See 'git --help'.`. – Jamgreen Nov 19 '15 at 10:19
  • its an GUI application for git server. its not an command. download that application named git extension and configure it. its a simple step process – Dharani Dharan Nov 19 '15 at 10:24
  • [GitExtensions](http://gitextensions.github.io/) is GUI-client (one of) for Git with reasonably smart [SSH-settings](https://git-extensions-documentation.readthedocs.org/en/latest/settings.html#ssh) – Lazy Badger Nov 20 '15 at 05:35
1

You have to execute the command from inside the git repository. i.e., the folder which contains the .git file

Santhosh R
  • 53
  • 1
  • 5
  • 1
    I do execute the command from inside the git rep. I have initialized with `git init`, added a new file with `git add README.md`, commited with `git commit -m "commit msg"`, added origin with `git remote add origin git@github.com:username/rep-name.git`, but now I cannot push to the rep – Jamgreen Nov 19 '15 at 10:23