warning: peer certificate won't be verified in this SSL session
This part of the message indicates that ruby won't be attempting to verify the certificate, so I don't think this is an SSL issue.
It appears that there is indeed no artifact at the URL in the error message:
$ curl -v -IHEAD https://artifacts.alfresco.com/org/alfresco/alfresco-core/4.2.b/alfresco-core-4.2.b.pom
[...]
> HEAD /org/alfresco/alfresco-core/4.2.b/alfresco-core-4.2.b.pom HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: artifacts.alfresco.com
> Accept: */*
>
< HTTP/1.1 404 Not Found
This suggests either a problem with the artifact name or with the repository. Peter's working example uses the repository https://artifacts.alfresco.com/nexus/content/groups/public/
. From the error message's URL, it looks like you are using https://artifacts.alfresco.com/
. Can you try Peter's repository URL?