0

My situation :

  • I have a bunch of folders on my local development machine
  • I want to version them on a remote server
  • This server uses a custom ssh port (not 22)
  • I can do what i need on this server, i have root permissions.
  • It doesn't matter if i have to clone empty repos from the server or create local ones and push them. I am free of create/copy/move/delete on the remote and on the local machines.

My problem :

  • Can't clone a distant repo or push to one

My goals :

  • having a working git server (remote) to hold the repositories
  • working the development on my local machine (Windows), uploading it to the remote server on a regular basis

What i did so far :

  • created a "git" user on the server
  • generated a key pair on my local machine with puttygen
  • added the public key to /home/git/.ssh/authorized_keys
  • tested access with putty using the private key : it works
  • tried with git with different tools (including tortoisegit) : the login part does not seem to work

Any help greatly appreciated, thanks

MarvinLeRouge
  • 444
  • 5
  • 15

1 Answers1

1

Use ssh://USERNAME@SERVERNAME:PORT/PATH as URL on the client side. For more detailed PuTTY configuration on client side please see https://stackoverflow.com/a/29183147/3906760

For the server part there are tutorials such as https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server.

MrTux
  • 32,350
  • 30
  • 109
  • 146
  • @MarvinLeRouge please consider to upvote and to accept this answer if it helped you. That is the way to say thank you on stackoverflow. – MrTux Apr 09 '18 at 17:54