0

A list of things I've done:

  • Generated a (public) key with puttygen and saved the (public key) as 'id_rsa' in my users/user/.ssh folder

  • Entered my .ssh key in my BitBucket settings

  • When I'm trying to git push my code into my BitBucket repository it will ask for a passphrase -> although when I enter a passphrase it will say permission denied(publickey).

I've tried deleting the public key, make a new one, use another passphrase and nothing worked. What am I doing wrong?

// Git init / remote etc. done already

λ git push --set-upstream origin master
Enter passphrase for key '/c/Users/user/.ssh/id_rsa':
Permission denied (publickey).
fatal: Could not read from remote repository.

Needlessly to say I'm working on Windows. Haven't experienced any problems on an OSx system.

Jakuje
  • 24,773
  • 12
  • 69
  • 75
Leguam
  • 1,202
  • 2
  • 14
  • 35
  • Putty keys are *NOT* valid RSA keys. Your best bet would be use [Git Bash](https://git-for-windows.github.io/) and use `ssh-keygen` like *nix style OS - you may also need to run `ssh-agent` [Read more on this here](http://stackoverflow.com/questions/6565357/git-push-requires-username-and-password#18348125) – Ash Mar 17 '16 at 10:21
  • I did that now. Got an id_rsa file inside my `.ssh` folder. It generates a pretty long rsa key which doesn't seem to be a valid SSH key (bitbucket says so) – Leguam Mar 17 '16 at 10:33
  • 1
    `id_rsa` is the private part, you shouldn't upload it anywhere – wRAR Mar 17 '16 at 10:50
  • @wRAR that's what `ssh-keygen` generates. – Leguam Mar 17 '16 at 11:04
  • 5
    ssh-keygen should have generated (or offered to generate) two files: id_rsa and id_rsa.pub. The first file should stay secret. The contents of the second file is what you add to bitbucket. – Kenster Mar 17 '16 at 11:09
  • Basically: [follow this guide to the letter](https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html). – Harmelodic Mar 17 '16 at 11:43

0 Answers0