gpt4 book ai didi

java - AT-Sign 版本 :perform 上的主机名

转载 作者:行者123 更新时间:2023-12-02 05:46:05 26 4
gpt4 key购买 nike

我尝试使用 Maven 在 GitHub 中发布项目。

<scm>
<connection>scm:git:git://github.com/jenkinsci/jabber-server-plugin.git</connection>
<developerConnection>scm:git:git@github.com/jenkinsci/jabber-server-plugin.git</developerConnection>
<url>http://github.com/jenkinsci/jabber-server-plugin</url>
</scm>

不幸的是,maven 无法 git-clone 到服务器 @github.com

全文:

fatal: Unable to look up @github.com (port 9418) 
(Beim Datenbankaufruf ist ein nicht behebbarer Fehler aufgetreten. )

我需要做什么来强制主机名 github.com 有什么建议吗?

最佳答案

首先,如果需要指定ssh用户git@:

<developerConnection>scm:git:git@github.com:jenkinsci/jabber-server-plugin.git</developerConnection>

即:在 github.com 之后使用“:”而不是“/”,如下所示:

<小时/>

如果仍然失败,您可以采取一些解决方法:

如果您想保留developerConnection 部分的ssh URL,请尝试查看 url examples 是否有效。更好地工作:

scm:git:ssh://server_name[:port]/path_to_repository

即:

<developerConnection>scm:git:ssh://git@github.com/jenkinsci/jabber-server-plugin.git</developerConnection>

(因此明确指定 ssh:// 协议(protocol),如“How to Use Maven Release Plugin with GitHub Releases ”中使用的)

<小时/>

作为最后的手段,您可以尝试另一种不必使用非默认端口或 ssh 的协议(protocol),例如 https 协议(protocol),如 Maven SCM Git 中列出的。 :

scm:git:https://server_name[:port]/path_to_repository

这将给出:

<scm>
<connection>scm:git:https://github.com/jenkinsci/jabber-server-plugin.git</connection>
<developerConnection>scm:git:https://yourLogin@github.com/jenkinsci/jabber-server-plugin.git</developerConnection>
<url>http://github.com/jenkinsci/jabber-server-plugin</url>
</scm>

关于java - AT-Sign 版本 :perform 上的主机名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24062982/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com