{"thread":{"id":"25304","subject":"Someone using GIT and Maven?","startedAt":"2010-10-01T06:11:30Z","lastAt":"2010-10-06T13:23:32Z","messageCount":4,"participants":["cdossantos","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"152218","messageId":"1285913490619-5590307.post@n2.nabble.com","threadId":"25304","inReplyTo":null,"subject":"Someone using GIT and Maven?","fromName":"cdossantos","fromEmail":"claudia.dossantos@ricoh-europe.com","sentAt":"2010-10-01T06:11:30Z","receivedAt":"2010-10-01T06:11:30Z","isPatch":false,"sender":{"key":"claudia.dossantos@ricoh-europe.com","avatar":null},"body":"\nHello,\n\nI'm evaluating GIT in a Linux environment (Ubuntu 10.04) and one of our\nrequirements is compliance with Maven 2.0. \nI tested the maven release plugin (mvn\norg.apache.maven.plugins:maven-release-plugin:2.0:prepare) but got this\nerror:\n\n...\n[INFO] Checking in modified POMs...\n[INFO] Executing: /bin/sh -c cd /root/git-repos4/project2 && git add --\npom.xml moduleA/pom.xml moduleB/pom.xml\n[INFO] Working directory: /root/git-repos4/project2\n[INFO] Executing: /bin/sh -c cd /root/git-repos4/project2 && git status\n[INFO] Working directory: /root/git-repos4/project2\n[INFO] Executing: /bin/sh -c cd /root/git-repos4/project2 && git commit\n--verbose -F /tmp/maven-scm-845822206.commit pom.xml moduleA/pom.xml\nmoduleB/pom.xml\n[INFO] Working directory: /root/git-repos4/project2\n[INFO] Executing: /bin/sh -c cd /root/git-repos4/project2 && git\nsymbolic-ref HEAD\n[INFO] Working directory: /root/git-repos4/project2\n[INFO] Executing: /bin/sh -c cd /root/git-repos4/project2 && git push\nhttp://172.17.27.218/project2 master:master\n[INFO] Working directory: /root/git-repos4/project2\n[INFO]\n------------------------------------------------------------------------\n[ERROR] BUILD FAILURE\n[INFO]\n------------------------------------------------------------------------\n[INFO] Unable to commit files\nProvider message:\nThe git-push command failed.\nCommand output:\nerror: Cannot access URL http://172.17.27.218/project2/, return code 22\nfatal: git-http-push failed\n\nBut if i use the git command push i don't have any problems:\n\n~/git-repos4/project2# git push origin master\nFetching remote heads...\n  refs/\n  refs/heads/\n  refs/tags/\nupdating 'refs/heads/master'\n  from 44728f87a5a6f90a0c8e131ad7749811ac133681\n  to   8a451fc775478c144686744a0b4c0490be23b0b9\n    sending 6 objects\n    done\nUpdating remote server info\nTo http://localhost/project2/\n   44728f8..8a451fc  master -> master\n\nCould be an authentication problem?\nI tried as well the command with username and password (mvn\n-Dusername=\"admin\" -Dpassword=\"admin\"\norg.apache.maven.plugins:maven-release-plugin:2.0:prepare), but got the same\nerror.\nThen I tried to change the scm connection in the POM file, but got the same\nerror:\n<scm>\n   \n<connection>scm:git:http://admin:admin@172.17.27.218/project2</connection>\n</scm>\n\n\nI have the file .netrc configured with host, username and password. Does\nMaven use this file?\n\nAny ideas?\n\nregards,\n\nSantos \n-- \nView this message in context: http://git.661346.n2.nabble.com/Someone-using-GIT-and-Maven-tp5590307p5590307.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"152757","messageId":"1286365670193-5606731.post@n2.nabble.com","threadId":"25304","inReplyTo":"1285913490619-5590307.post@n2.nabble.com","subject":"Re: Someone using GIT and Maven?","fromName":"cdossantos","fromEmail":"claudia.dossantos@ricoh-europe.com","sentAt":"2010-10-06T11:47:50Z","receivedAt":"2010-10-06T11:47:50Z","isPatch":false,"sender":{"key":"claudia.dossantos@ricoh-europe.com","avatar":null},"body":"\nHi,\n\nI made new tests and the problem just occur in my Linux environment. \nI used, in my Windows environment, the command \"mvn -Dusername=admin\n-Dpassword=admin org.apache.maven.plugins:maven-release-plugin:2.0:prepare\"\nand it worked!\n\nThe difference is that in my Linux environment I can just clone the GIT\nrepository using localhost (git clone http://localhost/project2), if I try\nto use the Server IP address I get this error:\nWarning: remote HEAD refers to nonexistent ref, unable to checkout.\n\n I review the Apache HTTP Server settings and I didn't find anything. I'm\nable to browse the GIT Repository using Localhost\n(http://localhost/project2) or the Server IP address\n(http://10.1.1.2/project2).\n\nAny ideas?\n\nregards,\nSantos\n-- \nView this message in context: http://git.661346.n2.nabble.com/Someone-using-GIT-and-Maven-tp5590307p5606731.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"152758","messageId":"AANLkTimgbxLiz5pNZTwvq-xjj_dEuf9L9PEf=zEe0bv0@mail.gmail.com","threadId":"25304","inReplyTo":"1286365670193-5606731.post@n2.nabble.com","subject":"Re: Someone using GIT and Maven?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-10-06T12:46:50Z","receivedAt":"2010-10-06T12:46:50Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Wed, Oct 6, 2010 at 11:47, cdossantos\n<claudia.dossantos@ricoh-europe.com> wrote:\n\n> Any ideas?\n\nSince you have problems when you invoke Git via Maven but not when you\ninvoke Git directly it would probably be better to ask these questions\non a forum for Maven.\n\nYou proably aren't going to find people here that know enough maven\ninternals offhand to know where it's screwing up its git invocations.\n"},{"id":"152759","messageId":"1286371412868-5607053.post@n2.nabble.com","threadId":"25304","inReplyTo":"1285913490619-5590307.post@n2.nabble.com","subject":"Re: Someone using GIT and Maven?","fromName":"cdossantos","fromEmail":"claudia.dossantos@ricoh-europe.com","sentAt":"2010-10-06T13:23:32Z","receivedAt":"2010-10-06T13:23:32Z","isPatch":false,"sender":{"key":"claudia.dossantos@ricoh-europe.com","avatar":null},"body":"\nHello,\n\nI found the problem, according with\n\"http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt\"\ni should use the .netrc file to authentication. My .netrc file is configured\nwith localhost, and I configured localhost for the \"remote\" entry in the\nconfig file (.git) as well.\nNow I'm using localhost in the SCM connection too:\n<scm>\n    <connection>scm:git:http://admin:admin@localhost/project2</connection>\n</scm> \n\nregards,\n\nSantos\n-- \nView this message in context: http://git.661346.n2.nabble.com/Someone-using-GIT-and-Maven-tp5590307p5607053.html\nSent from the git mailing list archive at Nabble.com.\n"}]}