我想在 Windows 上运行的远程服务器上执行 CI/CD 以托管我的 VueJs 项目。为此,我执行了以下步骤
我已将本地计算机的 ssh 作为授权密钥添加到远程服务器,并且可以使用以下命令通过 ssh 访问 admin(cmd) 远程服务器。
ssh remote_server@<ip_address>
Run Code Online (Sandbox Code Playgroud)
使用上述命令,git bash 使用以下c:/users/remote_user1 远程服务器的位置打开 cmd ,我在其中添加了本地计算机的 ssh 作为授权密钥。
我C:/users/remote_user1通过使用以下命令通过 rdp 登录远程计算机来创建裸 git repo in
git init test.git --bare
Run Code Online (Sandbox Code Playgroud)
我给了test.git远程服务器的完全访问权限
我尝试test.git使用来自 git bash 的命令在本地机器上进行克隆
git clone ssh://remoteserver@<ip_address>:/test.git
Run Code Online (Sandbox Code Playgroud)
当我使用本地机器上的命令时,我收到来自 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 …Run Code Online (Sandbox Code Playgroud)