2

I have limited access to server. What I did:

Server:

mkdir project.git
cd project.git
git init --bare

My local pc (windows):

git clone myusername@myserver.com:project.git
// make some files
git commit -m 'init'
git push

I can work with no problem using my server (push, pull, branch, whatever). Problem is that each operation require password and it is annoying (I have long passwords).

I was trying this: git config credential.helper store


Edit after @VonC answer

This is about SSH config, not GIT. The solution IS available in topic Configuring Git over SSH to login once but is on the bottom with only 17 votes.

  1. I've already had configured GIT ssh key.
  2. Only thing I had to do was ssh-copy-id -i .ssh/id_rsa.pub userlogin@sshserver.com*. Done! No more password need.

Full process, including generating ssh key can be found here: SSH with authentication key instead of password*

*ssh commands are available from git-bash on Windows

imclickingmaniac
  • 1,467
  • 1
  • 16
  • 28

1 Answers1

2

Check the result of

ssh -Tv myusername@myserver.com

That will show you which ssh key it is trying: you need your public ssh key to be on the server side, at ~username/.ssh/authorized_keys in order for your ssh connection to not default to the username/password authentication scheme.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250