* Someone using GIT and Maven?
@ 2010-10-01 6:11 cdossantos
2010-10-06 11:47 ` cdossantos
2010-10-06 13:23 ` cdossantos
0 siblings, 2 replies; 4+ messages in thread
From: cdossantos @ 2010-10-01 6:11 UTC (permalink / raw)
To: git
Hello,
I'm evaluating GIT in a Linux environment (Ubuntu 10.04) and one of our
requirements is compliance with Maven 2.0.
I tested the maven release plugin (mvn
org.apache.maven.plugins:maven-release-plugin:2.0:prepare) but got this
error:
...
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd /root/git-repos4/project2 && git add --
pom.xml moduleA/pom.xml moduleB/pom.xml
[INFO] Working directory: /root/git-repos4/project2
[INFO] Executing: /bin/sh -c cd /root/git-repos4/project2 && git status
[INFO] Working directory: /root/git-repos4/project2
[INFO] Executing: /bin/sh -c cd /root/git-repos4/project2 && git commit
--verbose -F /tmp/maven-scm-845822206.commit pom.xml moduleA/pom.xml
moduleB/pom.xml
[INFO] Working directory: /root/git-repos4/project2
[INFO] Executing: /bin/sh -c cd /root/git-repos4/project2 && git
symbolic-ref HEAD
[INFO] Working directory: /root/git-repos4/project2
[INFO] Executing: /bin/sh -c cd /root/git-repos4/project2 && git push
http://172.17.27.218/project2 master:master
[INFO] Working directory: /root/git-repos4/project2
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Unable to commit files
Provider message:
The git-push command failed.
Command output:
error: Cannot access URL http://172.17.27.218/project2/, return code 22
fatal: git-http-push failed
But if i use the git command push i don't have any problems:
~/git-repos4/project2# git push origin master
Fetching remote heads...
refs/
refs/heads/
refs/tags/
updating 'refs/heads/master'
from 44728f87a5a6f90a0c8e131ad7749811ac133681
to 8a451fc775478c144686744a0b4c0490be23b0b9
sending 6 objects
done
Updating remote server info
To http://localhost/project2/
44728f8..8a451fc master -> master
Could be an authentication problem?
I tried as well the command with username and password (mvn
-Dusername="admin" -Dpassword="admin"
org.apache.maven.plugins:maven-release-plugin:2.0:prepare), but got the same
error.
Then I tried to change the scm connection in the POM file, but got the same
error:
<scm>
<connection>scm:git:http://admin:admin@172.17.27.218/project2</connection>
</scm>
I have the file .netrc configured with host, username and password. Does
Maven use this file?
Any ideas?
regards,
Santos
--
View this message in context: http://git.661346.n2.nabble.com/Someone-using-GIT-and-Maven-tp5590307p5590307.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Someone using GIT and Maven?
2010-10-01 6:11 Someone using GIT and Maven? cdossantos
@ 2010-10-06 11:47 ` cdossantos
2010-10-06 12:46 ` Ævar Arnfjörð Bjarmason
2010-10-06 13:23 ` cdossantos
1 sibling, 1 reply; 4+ messages in thread
From: cdossantos @ 2010-10-06 11:47 UTC (permalink / raw)
To: git
Hi,
I made new tests and the problem just occur in my Linux environment.
I used, in my Windows environment, the command "mvn -Dusername=admin
-Dpassword=admin org.apache.maven.plugins:maven-release-plugin:2.0:prepare"
and it worked!
The difference is that in my Linux environment I can just clone the GIT
repository using localhost (git clone http://localhost/project2), if I try
to use the Server IP address I get this error:
Warning: remote HEAD refers to nonexistent ref, unable to checkout.
I review the Apache HTTP Server settings and I didn't find anything. I'm
able to browse the GIT Repository using Localhost
(http://localhost/project2) or the Server IP address
(http://10.1.1.2/project2).
Any ideas?
regards,
Santos
--
View this message in context: http://git.661346.n2.nabble.com/Someone-using-GIT-and-Maven-tp5590307p5606731.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Someone using GIT and Maven?
2010-10-06 11:47 ` cdossantos
@ 2010-10-06 12:46 ` Ævar Arnfjörð Bjarmason
0 siblings, 0 replies; 4+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-10-06 12:46 UTC (permalink / raw)
To: cdossantos; +Cc: git
On Wed, Oct 6, 2010 at 11:47, cdossantos
<claudia.dossantos@ricoh-europe.com> wrote:
> Any ideas?
Since you have problems when you invoke Git via Maven but not when you
invoke Git directly it would probably be better to ask these questions
on a forum for Maven.
You proably aren't going to find people here that know enough maven
internals offhand to know where it's screwing up its git invocations.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Someone using GIT and Maven?
2010-10-01 6:11 Someone using GIT and Maven? cdossantos
2010-10-06 11:47 ` cdossantos
@ 2010-10-06 13:23 ` cdossantos
1 sibling, 0 replies; 4+ messages in thread
From: cdossantos @ 2010-10-06 13:23 UTC (permalink / raw)
To: git
Hello,
I found the problem, according with
"http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt"
i should use the .netrc file to authentication. My .netrc file is configured
with localhost, and I configured localhost for the "remote" entry in the
config file (.git) as well.
Now I'm using localhost in the SCM connection too:
<scm>
<connection>scm:git:http://admin:admin@localhost/project2</connection>
</scm>
regards,
Santos
--
View this message in context: http://git.661346.n2.nabble.com/Someone-using-GIT-and-Maven-tp5590307p5607053.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-06 13:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-01 6:11 Someone using GIT and Maven? cdossantos
2010-10-06 11:47 ` cdossantos
2010-10-06 12:46 ` Ævar Arnfjörð Bjarmason
2010-10-06 13:23 ` cdossantos
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).