Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
windows访问我自己的git服务器的正确url_Git_Amazon Web Services_Git Shell - Fatal编程技术网

windows访问我自己的git服务器的正确url

windows访问我自己的git服务器的正确url,git,amazon-web-services,git-shell,Git,Amazon Web Services,Git Shell,所以我在AWS上安装了git服务器,它在我的mac和ubuntu上运行得非常好,但是我在使用windows连接它时遇到了麻烦。 这是我得到的步骤和错误 步骤: 1. generate keys using "ssh-keygen -t rsa -b 4096" 2. put the key on server using "echo 'sshkey' >> .ssh/authorized_keys" 3. init repo on windows, set remote to "gi

所以我在AWS上安装了git服务器,它在我的mac和ubuntu上运行得非常好,但是我在使用windows连接它时遇到了麻烦。 这是我得到的步骤和错误

步骤:

1. generate keys using "ssh-keygen -t rsa -b 4096"
2. put the key on server using "echo 'sshkey' >> .ssh/authorized_keys"
3. init repo on windows, set remote to "git remote add origin git@git-myserver-GitName.git"
4. setup config file with the public ip:
    Host git-myserver
        HostName <publicIP>
        User git
        IdentityFile ~/.ssh/keyForGitServer
        RequestTTY no

5. git pull origin master

如有任何建议,将不胜感激

在你的问题中,你说你正在使用:

git@git-myserver-GitName.git
这不是有效的存储库规范;您需要告诉git(a)要使用哪个用户名,(b)要使用哪个远程主机,以及(c)要使用远程主机上的哪个存储库。ssh存储库规范的标准格式是:

<user>@<remotehost>:<path_to_repository>
对于相对于远程主目录的存储库,可以使用相对路径:

git remote add origin git@myserver.example.com:myrepo.git
您还可以将SSH远程服务器指定为:

ssh://<user>@<remotehost>/<repository>
ssh://@/

更多信息请参见。

在您的问题中,您说您正在使用:

git@git-myserver-GitName.git
这不是有效的存储库规范;您需要告诉git(a)要使用哪个用户名,(b)要使用哪个远程主机,以及(c)要使用远程主机上的哪个存储库。ssh存储库规范的标准格式是:

<user>@<remotehost>:<path_to_repository>
对于相对于远程主目录的存储库,可以使用相对路径:

git remote add origin git@myserver.example.com:myrepo.git
您还可以将SSH远程服务器指定为:

ssh://<user>@<remotehost>/<repository>
ssh://@/

更多信息请参阅。

我相信您必须在首次拉入之前进行git克隆…
git@git-myserver GitName.git
不是有效的存储库规范。您需要
@:
,例如
git@git-myserver.com:path/to/GitName.git
@larsks thx!,我想这就是我正在寻找的解决方案,当我在我的windows笔记本电脑上测试它时,我会给你回复的@拉尔克斯,成功了!,除了我使用git-myserver而不是git-myserver.com作为主机外,您是否希望将其移动到回答部分,以便我们可以结束此问题?我相信您必须在首次拉取之前进行git克隆…
git@git-myserver GitName.git
不是有效的存储库规范。您需要
@:
,例如
git@git-myserver.com:path/to/GitName.git
@larsks thx!,我想这就是我正在寻找的解决方案,当我在我的windows笔记本电脑上测试它时,我会给你回复的@拉尔克斯,成功了!,除了我使用git-myserver而不是git-myserver.com作为主机外,您是否希望将其移动到回答部分,以便我们可以结束此问题?