无法使用gitlab上的composer和private repository解析主机名

时间:2017-07-05 14:43:35

标签: git composer-php gitlab gitlab-ci

当我想在编辑器中使用私有git存储库时,我添加了像

这样的私有存储库
{
    type: "git", 
    url: [git@host:port]:directory/subdirectory/repo. git"
} 

在我的Mac上它工作正常,但在服务器上(Debian)我正在尝试进行git克隆时获得could not resolve hostname host:port]:

但主机名无法访问。它似乎不喜欢语法[git@host:port]:

我会使用type:gitlab,但是composer在gitlab中的子目录有问题。

1 个答案:

答案 0 :(得分:0)

问题将是端口 - 您可以尝试通过http - 如果使用标准端口不是一个选项

"url" : "http://user:password@host:port/directory/subdirectory/repo.git",

我猜你也测试过这种表示法:

"url" : "ssh://git@host:port/directory/subdirectory/repo.git",
相关问题