Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up Git Server on windows remote computer

I want to perform CI/CD on remote server running on windows for hosting my VueJs project. For doing that I have performed the following steps

  1. I have added my ssh of my local machine to remote server as authorised keys and I am able to access the admin(cmd) remote server via ssh by using the following command.

    ssh remote_server@<ip_address>
    

Using the above command the git bash opens cmd with following location c:/users/remote_user1 of remote server where I had added ssh of my local machine as authorized key.

  1. I created bare git repo in C:/users/remote_user1 by logging in remote computer by rdp using the following command

    git init test.git --bare
    
  2. I gave Full access rights to test.git from remote server

  3. I tried to clone test.git on my local machine using the command from git bash

    git clone ssh://remoteserver@<ip_address>:/test.git
    

when I use the command from my local machine I get the error message from git bash

fatal: ''/test.git'' does not appear to be a git repository
fatal: Could not read from remote repository.

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

I am not able to understand what am I am doing wrong here, Please guide me on this.

like image 734
Pushkar Shirodkar Avatar asked Nov 07 '22 05:11

Pushkar Shirodkar


1 Answers

The format for ssh urls must be one of :

# 'ssh://' url :
ssh://remoteserver@<ip_address>/test.git

# scp-like syntax :
remoterserver@<ip_address>:test.git

(link to docs)

The url you posted contains a :/ which makes it a mixture of both, you should modify this url to match one of the two accepted formats.

like image 176
LeGEC Avatar answered Nov 11 '22 06:11

LeGEC