mschonaker / wagon-git

Git Wagon for Apache Maven
http://synergian.github.io/wagon-git/
83 stars 32 forks source link

Could not transfer artifact #22

Closed freelancer123 closed 10 years ago

freelancer123 commented 10 years ago

My project is hosted on Openshift and I'm trying to add a dependency on an artifact hosted in a private bitbucket repo using wagon-git. I set up the settings.xml file with the username and ran "mvn clean install -s path_to_settings.xml"

Build fails with this error: Failed to read artifact descriptor for com.company.name:name-model:jar:1.0: Could not transfer artifact.com.company.name:name-model:pom:1.0 from/to name-repo (git:releases://git@bitbucket.org:name/name-mavenrepo.git): No connector available to access repository name-repo (git:releases://git@bitbucket.org:name/name-mavenrepo.git) of type default using the available factories WagonRepositoryConnectorFactory

mschonaker commented 10 years ago

Looks like maven doesn't know it can process the "git" URLs, possibly because you have omitted the extensions part of the configuration. Please check the "Extensions section" here http://synergian.github.io/wagon-git/usage.html

If that's not the problem, is it possible to see your pom.xml?

freelancer123 commented 10 years ago

Thanks for the quick response mschonaker! I made the changes to the pom and that fixed the problem on my local machine.

However, it still fails on OpenShift with a different error. Perhaps wagon-git is trying to access a disk location that is not accessible on OpenShift? This is the error:

remote: [INFO] Working directory: /tmp/wagon-git-2462fa0e86664e590b1e4064d697c8f146dfd77c remote: [INFO] Executing: /bin/sh -c cd /tmp/wagon-git-2462fa0e86664e590b1e4064d697c8f146dfd77c && git clean -fdx remote: [INFO] Working directory: /tmp/wagon-git-2462fa0e86664e590b1e4064d697c8f146dfd77c remote: [INFO] Executing: /bin/sh -c cd /tmp/wagon-git-2462fa0e86664e590b1e4064d697c8f146dfd77c && git pull origin releases remote: [INFO] Working directory: /tmp/wagon-git-2462fa0e86664e590b1e4064d697c8f146dfd77c remote: [INFO] [git] Host key verification failed. remote: [INFO] [git] fatal: Could not read from remote repository. remote: [INFO] [git] remote: [INFO] [git] Please make sure you have the correct access rights remote: [INFO] [git] and the repository exists. remote: [WARNING] Checksum validation failed, could not read expected checksum: /var/lib/openshift/45f1a343e0a8casdc2120045/app-root/runtime /repo/$OPENSHIFT_DATA_DIR/com/company/appname/appname-model/1.0/appname-model-1.0.pom.sha1.tmp326c2245a69e45db (No such file o r directory) for git:releases://git@bitbucket.org:appname/appname-mavenrepo.git/com/company/appname/appname-model/1.0/dirt ydining-model-1.0.pom remote: [WARNING] Checksum validation failed, could not read expected checksum: /var/lib/openshift/45f1a343e0a8casdc2120045/app-root/runtime /repo/$OPENSHIFT_DATA_DIR/com/company/appname/appname-model/1.0/appname-model-1.0.pom.sha1.tmpbcf824a2f0f940ab (No such file o r directory) for git:releases://git@bitbucket.org:appname/appname-mavenrepo.git/com/company/appname/appname-model/1.0/dirt ydining-model-1.0.pom remote: Downloaded: git:releases://git@bitbucket.org:appname/appname-mavenrepo.git/com/company/appname/appname-model/1.0/d irtydining-model-1.0.pom (0 B at 0.0 KB/sec) remote: [INFO] Executing: /bin/sh -c cd /tmp/wagon-git-2462fa0e86664e590b1e4064d697c8f146dfd77c && git add . remote: [INFO] Working directory: /tmp/wagon-git-2462fa0e86664e590b1e4064d697c8f146dfd77c remote: [INFO] Executing: /bin/sh -c cd /tmp/wagon-git-2462fa0e86664e590b1e4064d697c8f146dfd77c && git commit --allow-empty -m '[wagon-git] commit to branch releases 2/8/14 1:05 PM' remote: [INFO] Working directory: /tmp/wagon-git-2462fa0e86664e590b1e4064d697c8f146dfd77c remote: [INFO] [git] [releases 8aa6b1c] [wagon-git] commit to branch releases 2/8/14 1:05 PM remote: [INFO] [git] Committer: OpenShift System User 45f1a343e0a8casdc2120045@ex-std-node221.prod.rhcloud.com remote: [INFO] [git] Your name and email address were configured automatically based remote: [INFO] [git] on your username and hostname. Please check that they are accurate. remote: [INFO] [git] You can suppress this message by setting them explicitly: remote: [INFO] [git] remote: [INFO] [git] git config --global user.name "Your Name" remote: [INFO] [git] git config --global user.email you@example.com remote: [INFO] [git] remote: [INFO] [git] After doing this, you may fix the identity used for this commit with: remote: [INFO] [git] remote: [INFO] [git] git commit --amend --reset-author remote: [INFO] [git] remote: [INFO] Executing: /bin/sh -c cd /tmp/wagon-git-2462fa0e86664e590b1e4064d697c8f146dfd77c && git push --progress origin releases remote: [INFO] Working directory: /tmp/wagon-git-2462fa0e86664e590b1e4064d697c8f146dfd77c remote: [INFO] [git] Host key verification failed. remote: [INFO] [git] fatal: Could not read from remote repository. remote: [INFO] [git] remote: [INFO] [git] Please make sure you have the correct access rights remote: [INFO] [git] and the repository exists. remote: [WARNING] The POM for com.company.appname:appname-model:jar:1.0 is invalid, transitive dependencies (if any) will not be a vailable, enable debug logging for more details

mschonaker commented 10 years ago

It looks like you're having this problem (unrelated to wagon-git) http://stackoverflow.com/questions/15546073/using-git-submodules-with-ssh-authentication-on-openshift

freelancer123 commented 10 years ago

Thanks! You're absolutely correct. Thanks for the link as well. Let me see if I can fix this using their suggestions.