Re: [git-users] unable to push using smart http

2012-11-14 Thread kumar
Hi 

Thanks a lot. It is working now 

Directory was wrong now set to /usr/lib/git-core/ and changing the 
permission to www-data made it work 

Thanks

On Wednesday, November 14, 2012 8:54:11 PM UTC+5:30, Konstantin Khomoutov 
wrote:

 On Wed, 14 Nov 2012 05:58:47 -0800 (PST) 
 kumar t12...@gmail.com javascript: wrote: 

  I have setup smart http and now able to clone. I am using Ubuntu 
  12.10. but when i try to push i get the following error. 
  
  $git push http://192.168.0.66/git/gitrepos/project1.git master 
 [...] 
  ! [remote rejected] master - master (n/a (unpacked error)) 
  error: failed to puh some refs to ' 
  http://192.168.0.66/git/gitrepos/project1.git' 

 What puzzles me about this error is that I fail to find the 
 unpacked error phrase in the Git source tree (a version near the 1.8.0 
 release): 

 % git grep 'unpacked error' 
 % git name-rev --tags master 
 master tags/v1.8.0-rc0~48 

 Same results with the checkout of 1.7.10.4 (which your version of 
 Ubuntu seems to have packaged). 

 It might be that this error message is synthetic, but I fail to find 
 any relevant context in the results of `git grep -w unpacked` as well. 
 Again, this might signalize nothing special as I just did a quick 
 glance, but are you sure you copied and pasted the error message 
 correctly? 

  These are the setting have done. 
  
  SetEnv GIT_PROJECT_ROOT /var/www/git 
  SetEnv GIT_HTTP_EXPORT_ALL 
  ScriptAlias /git/ /usr/lib/git-core/git-http-backend/ 
  SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER 
  
  Directory /usr/lib/git/ 
  AllowOverride None 
  Options +ExecCGI -Includes 
  Order allow,deny 
  Allow from all 
  /Directory 

 This setting is odd, as the directory path for which you set 
 specific options using this directory does not match that specified by 
 the ScriptAlias directive above. 

 [...] 
  I have set git config http.receivepack true 
  I have given all permission to git folder drwxrwxrwx 3 root root 4096 
  Nov 13 23:13 git 
 [...] 

 The ownership and permissions on the root directory for your Git project 
 are plain wrong -- never ever allow *everyone* read/write access to a 
 directory (unless it also has the sticky bit set on it (/tmp is one 
 example). 

 Please grant the ownership recursively to the user www-data and 
 the same-named group -- Apache on a typical Debian(-based) distro runs 
 with the credentials of this special system user [*].  Then also make 
 sure the permissions on the hierarchy is also OK.  I'm not sure this 
 will fix your problem but if we suppose the root cause of this failure 
 is the Git's inability to unpack what it received due to permission 
 problems, this might help. 

 One way to change ownership/permissions is to run: 

 $ sudo chown -R www-data:www-data /var/www/git 

 to fix ownership and then 

 $ sudo find /var/www/git -type d -exec chmod 0775 '{}' \; \ 
-o -type f -exec chmod 0664 '{}' \; 

 to fix permissions (the trailing slash on the first line is to 
 signalize the line break to fit it into the mail message -- when running 
 the command on a real system remove it and write both parts on the same 
 line). 

 [*] It's possible to use something like mod-itk to allow serving 
 different virtual hosts using different credentials but this is not 
 the regular mode of operation, so do not consider this for now. 


-- 




Re: [git-users] Unable to push

2012-11-05 Thread William Mizuta
Is there conflicts in your repository? What is the result of a git status?

If there is no conflicts, I think that someome pushed new commits and you
need to do a git pull --rebase again.


William Seiti Mizuta
@williammizuta
Desenvolvedor da Caelum



On Mon, Nov 5, 2012 at 6:54 PM, kramer.newsreader 
kramer.newsrea...@gmail.com wrote:

 Frustrated new git user here...

 Anyway, I have some changes that I would like to push but am unable I get
 the following error:

 error: failed to push some refs to 'ssh://git@...'
 To prevent you from losing history, non-fast-forward updates were rejected
 Merge the remote changes (e.g. 'git pull') before pushing again.  See the
 'Note about fast-forwards' section of 'git push --help' for details.

 Okay, so if I am translating git's terminology back to human language, I
 believe that this is telling me that I cannot push because I would lose
 history.  My change is not downstream of where the head is.

 The thing is that I just did a successful git pull -rebase, so my changes
 should be right on top of the head.  I can confirm that by attempting
 another pull:

 JohnKramer-2:statistics jkramer$ git pull --rebase
 Current branch nov2012 is up to date.


 What's going on here?

 --




-- 




Re: [git-users] Unable to push

2012-11-05 Thread kramer.newsreader
Yeah that's what I would figure, but it isn't the case.  Git status shows 
no conflicts.  

I did a git pull(and did pull in a change or two that was made since my 
last post here).  Git status still showed no conflicts, so I tried a push 
again, but got the same error.


On Monday, November 5, 2012 3:58:22 PM UTC-5, William Mizuta wrote:

 Is there conflicts in your repository? What is the result of a git status?

 If there is no conflicts, I think that someome pushed new commits and you 
 need to do a git pull --rebase again.


 William Seiti Mizuta
 @williammizuta
 Desenvolvedor da Caelum



 On Mon, Nov 5, 2012 at 6:54 PM, kramer.newsreader 
 kramer.n...@gmail.comjavascript:
  wrote:

 Frustrated new git user here...

 Anyway, I have some changes that I would like to push but am unable I get 
 the following error:

 error: failed to push some refs to 'ssh://git@...'
 To prevent you from losing history, non-fast-forward updates were rejected
 Merge the remote changes (e.g. 'git pull') before pushing again.  See the
 'Note about fast-forwards' section of 'git push --help' for details.

 Okay, so if I am translating git's terminology back to human language, I 
 believe that this is telling me that I cannot push because I would lose 
 history.  My change is not downstream of where the head is.

 The thing is that I just did a successful git pull -rebase, so my changes 
 should be right on top of the head.  I can confirm that by attempting 
 another pull:

 JohnKramer-2:statistics jkramer$ git pull --rebase
 Current branch nov2012 is up to date.


 What's going on here?

 -- 
  
  




-- 




Re: [git-users] Unable to push

2012-11-05 Thread Alexandru Pătrănescu
maybe you have multiple remotes and you pull from one and try to push to
another.
show us as possible an output from:
*git branch -avv*
and
*git remote -vv*


Alexandru Patranescu
Tel: 0721378395


On Mon, Nov 5, 2012 at 11:33 PM, kramer.newsreader 
kramer.newsrea...@gmail.com wrote:

 Yeah that's what I would figure, but it isn't the case.  Git status shows
 no conflicts.

 I did a git pull(and did pull in a change or two that was made since my
 last post here).  Git status still showed no conflicts, so I tried a push
 again, but got the same error.



 On Monday, November 5, 2012 3:58:22 PM UTC-5, William Mizuta wrote:

 Is there conflicts in your repository? What is the result of a git status?

 If there is no conflicts, I think that someome pushed new commits and you
 need to do a git pull --rebase again.


 William Seiti Mizuta
 @williammizuta
 Desenvolvedor da Caelum



 On Mon, Nov 5, 2012 at 6:54 PM, kramer.newsreader 
 kramer.n...@gmail.comwrote:

 Frustrated new git user here...

 Anyway, I have some changes that I would like to push but am unable I
 get the following error:

 error: failed to push some refs to 'ssh://git@...'
 To prevent you from losing history, non-fast-forward updates were
 rejected
 Merge the remote changes (e.g. 'git pull') before pushing again.  See the
 'Note about fast-forwards' section of 'git push --help' for details.

 Okay, so if I am translating git's terminology back to human language, I
 believe that this is telling me that I cannot push because I would lose
 history.  My change is not downstream of where the head is.

 The thing is that I just did a successful git pull -rebase, so my
 changes should be right on top of the head.  I can confirm that by
 attempting another pull:

 JohnKramer-2:statistics jkramer$ git pull --rebase
 Current branch nov2012 is up to date.


 What's going on here?

 --




  --




-- 




Re: [git-users] Unable to push

2012-11-05 Thread Alexandru Pătrănescu
maybe you have multiple remotes and you pull from one and try to push to 
another.
show us as possible an output from:
*git branch -avv*
and
*git remote -vv*
*
*

On Monday, November 5, 2012 11:33:06 PM UTC+2, kramer.newsreader wrote:

 Yeah that's what I would figure, but it isn't the case.  Git status shows 
 no conflicts.  

 I did a git pull(and did pull in a change or two that was made since my 
 last post here).  Git status still showed no conflicts, so I tried a push 
 again, but got the same error.


 On Monday, November 5, 2012 3:58:22 PM UTC-5, William Mizuta wrote:

 Is there conflicts in your repository? What is the result of a git status?

 If there is no conflicts, I think that someome pushed new commits and you 
 need to do a git pull --rebase again.


 William Seiti Mizuta
 @williammizuta
 Desenvolvedor da Caelum



 On Mon, Nov 5, 2012 at 6:54 PM, kramer.newsreader 
 kramer.n...@gmail.comwrote:

 Frustrated new git user here...

 Anyway, I have some changes that I would like to push but am unable I 
 get the following error:

 error: failed to push some refs to 'ssh://git@...'
 To prevent you from losing history, non-fast-forward updates were 
 rejected
 Merge the remote changes (e.g. 'git pull') before pushing again.  See the
 'Note about fast-forwards' section of 'git push --help' for details.

 Okay, so if I am translating git's terminology back to human language, I 
 believe that this is telling me that I cannot push because I would lose 
 history.  My change is not downstream of where the head is.

 The thing is that I just did a successful git pull -rebase, so my 
 changes should be right on top of the head.  I can confirm that by 
 attempting another pull:

 JohnKramer-2:statistics jkramer$ git pull --rebase
 Current branch nov2012 is up to date.


 What's going on here?

 -- 
  
  




-- 




Re: [git-users] Unable to push

2012-11-05 Thread kramer.newsreader
Here you go.  I've anonymized checkin messages, domains, etc.

By the way, I am *attempting* to work on the nov2012 branch both locally 
and remotely.

$ git branch -avv
  master f645170 Fix over_18 parameter. See #19010
* nov20127fc7d04 [origin/nov2012] Little more javadoc
  ticket/15734   251a314 Adding support for ...
  ticket/17513   5251a79 Updated ...
  tmp_branch 3f4b7bd Fixed ...
  remotes/origin/HEAD- origin/master
  remotes/origin/master  9ecfb22 Support for ...
  remotes/origin/mojiva  71ef51a Fix ...
  remotes/origin/nov2012 7fc7d04 Little more javadoc
  remotes/origin/testa2b09e8 Recalculate ...
  remotes/origin/test-branch 443339d Fix ...
$ git remote -vv
gerritssh://user@gerrit.domain:29418/project (fetch)
gerritssh://user@gerrit.domain:29418/project (push)
originssh://git@git.domain/project (fetch)
originssh://git@git.domain/project (push)

On Monday, November 5, 2012 4:52:06 PM UTC-5, Alexandru Pătrănescu wrote:

 maybe you have multiple remotes and you pull from one and try to push to 
 another.
 show us as possible an output from:
 *git branch -avv*
 and
 *git remote -vv*
 *
 *

 On Monday, November 5, 2012 11:33:06 PM UTC+2, kramer.newsreader wrote:

 Yeah that's what I would figure, but it isn't the case.  Git status shows 
 no conflicts.  

 I did a git pull(and did pull in a change or two that was made since my 
 last post here).  Git status still showed no conflicts, so I tried a push 
 again, but got the same error.


 On Monday, November 5, 2012 3:58:22 PM UTC-5, William Mizuta wrote:

 Is there conflicts in your repository? What is the result of a git 
 status?

 If there is no conflicts, I think that someome pushed new commits and 
 you need to do a git pull --rebase again.


 William Seiti Mizuta
 @williammizuta
 Desenvolvedor da Caelum



 On Mon, Nov 5, 2012 at 6:54 PM, kramer.newsreader kramer.n...@gmail.com
  wrote:

 Frustrated new git user here...

 Anyway, I have some changes that I would like to push but am unable I 
 get the following error:

 error: failed to push some refs to 'ssh://git@...'
 To prevent you from losing history, non-fast-forward updates were 
 rejected
 Merge the remote changes (e.g. 'git pull') before pushing again.  See 
 the
 'Note about fast-forwards' section of 'git push --help' for details.

 Okay, so if I am translating git's terminology back to human language, 
 I believe that this is telling me that I cannot push because I would lose 
 history.  My change is not downstream of where the head is.

 The thing is that I just did a successful git pull -rebase, so my 
 changes should be right on top of the head.  I can confirm that by 
 attempting another pull:

 JohnKramer-2:statistics jkramer$ git pull --rebase
 Current branch nov2012 is up to date.


 What's going on here?

 -- 
  
  




-- 




Re: [git-users] Unable to push

2012-11-05 Thread Alexandru Pătrănescu
I see
I haven't use gerrit but from what I know, in a gerrit setup, you should 
not use the original repository.

you can fetch from gerrit from the branch named nov2012
and push to gerrit on a branch named for/nov2012

most probably in this setup, origin could read-only

I might suggest to you to not do this kind of branches base on time 
interval and start doing multiple of them based on topic.



On Monday, November 5, 2012 11:59:07 PM UTC+2, kramer.newsreader wrote:

 Here you go.  I've anonymized checkin messages, domains, etc.

 By the way, I am *attempting* to work on the nov2012 branch both locally 
 and remotely.

 $ git branch -avv
   master f645170 Fix over_18 parameter. See #19010
 * nov20127fc7d04 [origin/nov2012] Little more javadoc
   ticket/15734   251a314 Adding support for ...
   ticket/17513   5251a79 Updated ...
   tmp_branch 3f4b7bd Fixed ...
   remotes/origin/HEAD- origin/master
   remotes/origin/master  9ecfb22 Support for ...
   remotes/origin/mojiva  71ef51a Fix ...
   remotes/origin/nov2012 7fc7d04 Little more javadoc
   remotes/origin/testa2b09e8 Recalculate ...
   remotes/origin/test-branch 443339d Fix ...
 $ git remote -vv
 gerritssh://user@gerrit.domain:29418/project (fetch)
 gerritssh://user@gerrit.domain:29418/project (push)
 originssh://git@git.domain/project (fetch)
 originssh://git@git.domain/project (push)

 On Monday, November 5, 2012 4:52:06 PM UTC-5, Alexandru Pătrănescu wrote:

 maybe you have multiple remotes and you pull from one and try to push to 
 another.
 show us as possible an output from:
 *git branch -avv*
 and
 *git remote -vv*
 *
 *

 On Monday, November 5, 2012 11:33:06 PM UTC+2, kramer.newsreader wrote:

 Yeah that's what I would figure, but it isn't the case.  Git status 
 shows no conflicts.  

 I did a git pull(and did pull in a change or two that was made since my 
 last post here).  Git status still showed no conflicts, so I tried a push 
 again, but got the same error.


 On Monday, November 5, 2012 3:58:22 PM UTC-5, William Mizuta wrote:

 Is there conflicts in your repository? What is the result of a git 
 status?

 If there is no conflicts, I think that someome pushed new commits and 
 you need to do a git pull --rebase again.


 William Seiti Mizuta
 @williammizuta
 Desenvolvedor da Caelum



 On Mon, Nov 5, 2012 at 6:54 PM, kramer.newsreader 
 kramer.n...@gmail.com wrote:

 Frustrated new git user here...

 Anyway, I have some changes that I would like to push but am unable I 
 get the following error:

 error: failed to push some refs to 'ssh://git@...'
 To prevent you from losing history, non-fast-forward updates were 
 rejected
 Merge the remote changes (e.g. 'git pull') before pushing again.  See 
 the
 'Note about fast-forwards' section of 'git push --help' for details.

 Okay, so if I am translating git's terminology back to human language, 
 I believe that this is telling me that I cannot push because I would lose 
 history.  My change is not downstream of where the head is.

 The thing is that I just did a successful git pull -rebase, so my 
 changes should be right on top of the head.  I can confirm that by 
 attempting another pull:

 JohnKramer-2:statistics jkramer$ git pull --rebase
 Current branch nov2012 is up to date.


 What's going on here?

 -- 
  
  




-- 




Re: [git-users] Unable to push

2012-11-05 Thread kramer.newsreader


 Is your remote a 'bare' repository, or does it have a working directory? 
 -- I ask because you say you are working on the branch on both sides. 

  

 It is normal to have your remote as a 'bare' repo, though you can manage 
 if both are 'working' but in such cases you would use different branches on 
 the repos so that you won't loose data.


I am not really sure I understand your question.  I didn't set up this 
repository.  I have to work on it.

The person who did is mostly unavailable.  

Having said that I *think* it is bare but I'm not sure.

Does the output that I pasted above bear on that fact? If not, is there 
more information I can give?

Sorry, but git is very confusing to me.

-- 




Re: [git-users] Unable to push

2012-11-05 Thread William Mizuta
Try to say the branch you want to pull and push:

git pull origin nov2012 --rebase
git push origin nov2012


William Seiti Mizuta
@williammizuta
Desenvolvedor da Caelum



On Tue, Nov 6, 2012 at 3:43 AM, kramer.newsreader 
kramer.newsrea...@gmail.com wrote:



  Is your remote a 'bare' repository, or does it have a working directory?
 -- I ask because you say you are working on the branch on both sides.



 It is normal to have your remote as a 'bare' repo, though you can manage
 if both are 'working' but in such cases you would use different branches on
 the repos so that you won't loose data.


 I am not really sure I understand your question.  I didn't set up this
 repository.  I have to work on it.

 The person who did is mostly unavailable.

 Having said that I *think* it is bare but I'm not sure.

 Does the output that I pasted above bear on that fact? If not, is there
 more information I can give?

 Sorry, but git is very confusing to me.

 --




-- 




Re: [git-users] Unable to push

2012-11-05 Thread PJ Weisberg
On Monday, November 5, 2012, kramer.newsreader kramer.newsrea...@gmail.com
wrote:
 * nov20127fc7d04 [origin/nov2012] Little more javadoc
...
   remotes/origin/nov2012 7fc7d04 Little more javadoc

Same commit on both the local and remote branches.  It looks like you have
nothing to push, or you've already pushed it.

-- 
-PJ

Gehm's Corollary to Clark's Law: Any technology distinguishable from
magic is insufficiently advanced.

--