简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM