[ 
https://issues.apache.org/jira/browse/SCM-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17961450#comment-17961450
 ] 

ASF GitHub Bot commented on SCM-428:
------------------------------------

jira-importer commented on issue #646:
URL: https://github.com/apache/maven-scm/issues/646#issuecomment-2964608871

   **[Olivier 
Lamy](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=olamy)** 
commented
   
   fixed in rev [712872](http://svn.apache.org/viewvc?rev=712872&view=rev)
   




> url syntax not good enough for the git scm provider
> ---------------------------------------------------
>
>                 Key: SCM-428
>                 URL: https://issues.apache.org/jira/browse/SCM-428
>             Project: Maven SCM (Moved to GitHub Issues)
>          Issue Type: Improvement
>          Components: maven-scm-provider-gitexe
>    Affects Versions: 1.1
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>            Priority: Blocker
>             Fix For: 1.2
>
>
> The problem is that git supports 2 different URL schemes. For the normal RFC 
> 2396 standard and ssh style. So in theory all these styles should work:
> normal anonymous absolute:
> {code}git clone git://github.com/olamy/scm-git-test-one-module.git{code}
> normal anonymous relative:
> {code}git clone git://github.com:olamy/scm-git-test-one-module.git{code}
> normal developer absolute:
> {code}git clone ssh://[email protected]/olamy/scm-git-test-one-module.git{code}
> normal developer relative:
> {code}git clone ssh://[email protected]/~git/olamy/scm-git-test-one-module{code}
> ssh developer absolute:
> {code}git clone [email protected]/olamy/scm-git-test-one-module.git{code}
> ssh developer relative:
> {code}git clone [email protected]:olamy/scm-git-test-one-module{code}
> In reality the ssh:// URL is not always supported. (For example github does 
> not). In fact they suggest to use
> normal anonymous absolute:
> {code}git://github.com/olamy/scm-git-test-one-module.git{code}
> ssh developer relative:
> {code}[email protected]:olamy/scm-git-test-one-module.git{code}
> For the initial checkout the developer will use the command line and set 
> "[email protected]:olamy/scm-git-test-one-module.git" as the remote address. So 
> subsequent commits and tags (from the plugin) can work just fine as the URL 
> does not need to be specified anymore. But when the release plugin checks out 
> the code it will fail if the proper developer url 
> "ssh://[email protected]/~git/olamy/scm-git-test-one-module" (normal developer 
> relative) is set. (As the maven pom seems to expect that format).
> There are 3 ways to fix or work around this:
> 1) Use the normal anonymous URLs for both connections (developer and 
> anonymous) inside the pom. This will confused developers though as the 
> generated site tells the new developers to use the anonymous URL to checkout 
> the code. They will not be able to push if they do.
> 2) Have the scm/release plugin ignore the developer URL and use the anonymous 
> URL for the checkout. Again this will be confusing on the generated site as 
> the normal developer rel/abs URLs might not be supported.
> 3) Somehow store the URL in the format 
> "[email protected]:olamy/scm-git-test-one-module" in the pom. The problem is 
> that the POM expects the normal (RFC 2396) format AFAIU.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to