[git-users] git push problem (Windows)

2012-11-14 Thread Sergey Ovchinnikov
Hello, I had a problem. Hang when trying to do 'git push'.

The following sequence of actions.


git init --bare C:/Repo/egg.git

git daemon --verbose --enable=receive-pack --base-path=C:/Repo --export-all 
C:/Repo/egg.git --detach --syslog

In another folder:
git clone git://localhost/egg.git

ok.

Making changes:

touch readme.txt
git add readme.txt
git commit -m "first commit"

git push
...
In another folder 

demon console log:
[2236] Connection from 127.0.0.1:3044
[2236] Extended attributes (16 bytes) exist 
[2236] Request receive-pack for '/egg.git'

In what could be the problem?

-- 




Re: [git-users] GIT commercial licence

2012-11-14 Thread Philip Oakley
https://github.com/git/git/blob/master/COPYING
  - Original Message - 
  From: Philip Oakley 
  To: Srinivas reddy kukunoor ; git-users@googlegroups.com 
  Sent: Wednesday, November 14, 2012 12:53 AM
  Subject: Re: [git-users] GIT commercial licence


  Git is actually licenced under the Lesser GPL, that is V 2.0 as described in 
the COPYING file of the source code (e.g. see Github) In general this means 
that it can be used by commercial companies in the same manner as Linux is used.

  Philip

- Original Message - 
From: Srinivas reddy kukunoor 
To: git-users@googlegroups.com 
Sent: Tuesday, November 13, 2012 2:51 PM
Subject: [git-users] GIT commercial licence


Can I use GIT for developing commercial product? Is there any restriction 
on number of developers that can concurrently use the SCM? I mean some 
restriction to acquire a commercial license if more than 50 developers involved?

Thanks


-- 
 
 

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2793 / Virus Database: 2629/5890 - Release Date: 11/12/12

  No virus found in this message.
  Checked by AVG - www.avg.com
  Version: 2013.0.2793 / Virus Database: 2629/5892 - Release Date: 11/13/12


  -- 
   
   

-- 




[git-users] git push problem (Windows)

2012-11-14 Thread Thomas Ferris Nicolaisen
Git daemon only serves read operations. You can't push to it, only fetch or 
pull.

-- 




[git-users] Re: git push problem (Windows)

2012-11-14 Thread Sergey Ovchinnikov


I tried to do it also on MacOS. Successful.

Why this don't work on Windows XP?

среда, 14 ноября 2012 г., 12:37:31 UTC+3 пользователь Thomas Ferris 
Nicolaisen написал:
>
> Git daemon only serves read operations. You can't push to it, only fetch 
> or pull.

-- 




Re: [git-users] git push problem (Windows)

2012-11-14 Thread Konstantin Khomoutov
On Wed, 14 Nov 2012 01:37:31 -0800 (PST)
Thomas Ferris Nicolaisen  wrote:

> Git daemon only serves read operations. You can't push to it, only
> fetch or pull.
That is incorrect: the "--enable=receive-pack" command-line options
precisely enables the service which allows *anonymous* pushes.
This is very wrong in most cases (except for may be automated pushes
happening in a controlled environment) but possible to enable.

-- 




Re: [git-users] git push problem (Windows)

2012-11-14 Thread Konstantin Khomoutov
On Wed, 14 Nov 2012 00:04:29 -0800 (PST)
Sergey Ovchinnikov  wrote:

> Hello, I had a problem. Hang when trying to do 'git push'.
[...]
> git init --bare C:/Repo/egg.git
> git daemon --verbose --enable=receive-pack --base-path=C:/Repo
> --export-all C:/Repo/egg.git --detach --syslog
[...]
> In what could be the problem?

I suppose this is a known [1] problem [2].

Note that is you want to discuss this problems further, please do this
on the msysgit mailing list [3], not here.

1. http://code.google.com/p/msysgit/issues/detail?id=457
2. http://www.google.com/search?q=git+push+hangs+in+msysgit
3. http://groups.google.com/group/msysgit

-- 




[git-users] unable to push using smart http

2012-11-14 Thread kumar
Hi 
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
Counting objects: 5, done.
Writing objects: 100% (3/3), 276 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
error: unpack failed: unpack-objects abnormal exit
To http://192.168.0.66/git/gitrepos/project1.git
! [remote rejected] master -> master (n/a (unpacked error))
error: failed to puh some refs to ' 
http://192.168.0.66/git/gitrepos/project1.git'

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


AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all



AuthType Basic
AuthName "Git Access"


I have not added "Require group committers" so that i do not have to 
authenticate push. (actually not sure which username and password to use. 
Right now what to make git push working)

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

What else do i need to do to enable push
(Please note i am new to Linux and apache but learning :) )

Thanks

 

-- 




[git-users] converting from tar version backups to git

2012-11-14 Thread John McKown
I've just recently started learning about git and other version control 
systems. What I have done in the past is use "tar" to take a "checkpoint" 
of the files in my project subdirectory. So the project subdirectory is 
equivalent to the "working directory" in git. And each tar back is kind of 
like a commit. Well, I now want to start using git for this. What I have 
thought to do is the following for each tar backup, starting with the 
oldest and going in time order to the newest backup.

1) take a tar of the current project before I do a "git init" so that I 
have a "now" time backup.
2) rm (delete) all the files in the project subdirectory
3) do a "git init" in the project subdirectory.
4) for each tar backup, in order from oldest to newest, do:
4a) rm (delete) all files in the subdirectory - to remove all files 
from previous restore
4b) "tar xf" to restore the contents to the project subdirectory for 
the tar file's "point in time" backup
4c) do a "git status" and for each file marked as "removed", do a "git 
rm" to remove it from the index
  git status | awk '$2 = "deleted:" {print "git rm " $3;}' | sh
4d) "git add ." to add all the restored contents to the project 
subdirectory. Picks up new and modified files.
4e) "git commit" to commit this time (version)
4f) "git tag ..." to tag this commit with a label meaningful to me
 5) the project directory is now set up as well as I can.

I have done this already and it seems to have done what I am expecting: use 
git and have a "commit" for each level of my "snapshot" backups which were 
in tar files. 

Any thoughts gratefully received.

--
John

-- 




[git-users] git & make in the project directory

2012-11-14 Thread John McKown
This just occurred to me. I am running on Linux. I use "make" to do my 
compiles. Which I do in the working directory. I don't want the results of 
the compiles to be tracked in git. What I have done in the past is to have 
a clean directory when I did the "git commit", often with a "make clean" 
command. Also I have tried to put the generated file names into my 
.gitignore file. But what has occurred to me is to use branching. Maintain 
my source while I am in the "master" branch. Just before I do a "make", do 
"git checkout -b test" to switch to the "test" branch, creating it if 
necessary. Once I am finished testing, I do a "git checkout master" and git 
will "clean up" my working directory for me. I would never do a "git 
commit" while in the "test" branch. And I would periodically do a "git 
branch -D test" to totally clean up the "test" branch. Is this reasonable? 
Or just plain foolish?

--
John

-- 




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

2012-11-14 Thread Konstantin Khomoutov
On Wed, 14 Nov 2012 05:58:47 -0800 (PST)
kumar  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
> 
> 
> AllowOverride None
> Options +ExecCGI -Includes
> Order allow,deny
> Allow from all
> 

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] git & make in the project directory

2012-11-14 Thread Konstantin Khomoutov
On Wed, 14 Nov 2012 07:10:20 -0800 (PST)
John McKown  wrote:

> This just occurred to me. I am running on Linux. I use "make" to do
> my compiles. Which I do in the working directory. I don't want the
> results of the compiles to be tracked in git. What I have done in the
> past is to have a clean directory when I did the "git commit", often
> with a "make clean" command. Also I have tried to put the generated
> file names into my .gitignore file. But what has occurred to me is to
> use branching. Maintain my source while I am in the "master" branch.
> Just before I do a "make", do "git checkout -b test" to switch to the
> "test" branch, creating it if necessary. Once I am finished testing,
> I do a "git checkout master" and git will "clean up" my working
> directory for me. I would never do a "git commit" while in the "test"
> branch. And I would periodically do a "git branch -D test" to totally
> clean up the "test" branch. Is this reasonable? Or just plain foolish?

It's clearly an overengeneering.

The .gitignore file and other ways of ignoring stuff were primarily
invented to make Git not be interested in auto-generated cruft.
So just have your auto-generated cruft sitting in your work tree and
forget about it.

The only problem it might create is occasional adding of unwanted files
to the index and committing.  But this problem is really social:
*always* run `git status` before committing and check to see if you
have any odd files in the output.

-- 




Re: [git-users] GIT commercial licence

2012-11-14 Thread PJ Weisberg
On Tuesday, November 13, 2012, Philip Oakley  wrote:
> Git is actually licenced under the Lesser GPL, that is V 2.0 as described
in the COPYING file of the source code (e.g. see Github) In general this
means that it can be used by commercial companies in the same manner as
Linux is used.

Git is licensed under version 2 of the GPL, NOT any version of the LGPL.

-- 
-PJ

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

-- 




Re: [git-users] converting from tar version backups to git

2012-11-14 Thread Konstantin Khomoutov
On Wed, 14 Nov 2012 06:57:33 -0800 (PST)
John McKown  wrote:

> I've just recently started learning about git and other version
> control systems. What I have done in the past is use "tar" to take a
> "checkpoint" of the files in my project subdirectory. So the project
> subdirectory is equivalent to the "working directory" in git. And
> each tar back is kind of like a commit. Well, I now want to start
> using git for this. What I have thought to do is the following for
> each tar backup, starting with the oldest and going in time order to
> the newest backup.
> 
> 1) take a tar of the current project before I do a "git init" so that
> I have a "now" time backup.
> 2) rm (delete) all the files in the project subdirectory
> 3) do a "git init" in the project subdirectory.
> 4) for each tar backup, in order from oldest to newest, do:
> 4a) rm (delete) all files in the subdirectory - to remove all
> files from previous restore
> 4b) "tar xf" to restore the contents to the project subdirectory
> for the tar file's "point in time" backup
> 4c) do a "git status" and for each file marked as "removed", do a
> "git rm" to remove it from the index
>   git status | awk '$2 = "deleted:" {print "git rm " $3;}' |
> sh 4d) "git add ." to add all the restored contents to the project 
> subdirectory. Picks up new and modified files.
> 4e) "git commit" to commit this time (version)
> 4f) "git tag ..." to tag this commit with a label meaningful to me
>  5) the project directory is now set up as well as I can.
> 
> I have done this already and it seems to have done what I am
> expecting: use git and have a "commit" for each level of my
> "snapshot" backups which were in tar files. 
> 
> Any thoughts gratefully received.

(4a) seems to be redundant as you could just run `tar x --overwrite`
at step (4b).

Also `git status` is a "porcelain" (user-interfacing) command which is
not too suitable for scripting--you might have better results with
scripting the "plumbing" `git ls-files` command instead, which, for
instance, has the "--deleted" command-line option.

-- 




Re: [git-users] converting from tar version backups to git

2012-11-14 Thread John McKown
Thanks. I'm not scripting in this case, Just doing it all "by hand" since I 
only had 5 previous versions to "git-ify". I did the "rm *" in the project 
directory before the "tar x" to be sure that I would detect any deleted 
files. I likely did do a "overkill", but I was more concerned that I missed 
something subtle when I was "converting" my methodology. 

On Wednesday, November 14, 2012 9:37:05 AM UTC-6, Konstantin Khomoutov 
wrote:
>
> On Wed, 14 Nov 2012 06:57:33 -0800 (PST) 
> John McKown > wrote: 
>
> > I've just recently started learning about git and other version 
> > control systems. What I have done in the past is use "tar" to take a 
> > "checkpoint" of the files in my project subdirectory. So the project 
> > subdirectory is equivalent to the "working directory" in git. And 
> > each tar back is kind of like a commit. Well, I now want to start 
> > using git for this. What I have thought to do is the following for 
> > each tar backup, starting with the oldest and going in time order to 
> > the newest backup. 
> > 
> > 1) take a tar of the current project before I do a "git init" so that 
> > I have a "now" time backup. 
> > 2) rm (delete) all the files in the project subdirectory 
> > 3) do a "git init" in the project subdirectory. 
> > 4) for each tar backup, in order from oldest to newest, do: 
> > 4a) rm (delete) all files in the subdirectory - to remove all 
> > files from previous restore 
> > 4b) "tar xf" to restore the contents to the project subdirectory 
> > for the tar file's "point in time" backup 
> > 4c) do a "git status" and for each file marked as "removed", do a 
> > "git rm" to remove it from the index 
> >   git status | awk '$2 = "deleted:" {print "git rm " $3;}' | 
> > sh 4d) "git add ." to add all the restored contents to the project 
> > subdirectory. Picks up new and modified files. 
> > 4e) "git commit" to commit this time (version) 
> > 4f) "git tag ..." to tag this commit with a label meaningful to me 
> >  5) the project directory is now set up as well as I can. 
> > 
> > I have done this already and it seems to have done what I am 
> > expecting: use git and have a "commit" for each level of my 
> > "snapshot" backups which were in tar files. 
> > 
> > Any thoughts gratefully received. 
>
> (4a) seems to be redundant as you could just run `tar x --overwrite` 
> at step (4b). 
>
> Also `git status` is a "porcelain" (user-interfacing) command which is 
> not too suitable for scripting--you might have better results with 
> scripting the "plumbing" `git ls-files` command instead, which, for 
> instance, has the "--deleted" command-line option. 
>

-- 




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 > 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 
> > 
> >  
> > AllowOverride None 
> > Options +ExecCGI -Includes 
> > Order allow,deny 
> > Allow from all 
> >  
>
> 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. 
>

-- 




[git-users] git & make in the project directory

2012-11-14 Thread Thomas Ferris Nicolaisen
Also, have a look at git clean if you don't know it already.

-- 




[git-users] converting from tar version backups to git

2012-11-14 Thread Thomas Ferris Nicolaisen
I think you could just do a git add -A in steps 4c/d instead.

-- 




[git-users] Re: converting from tar version backups to git

2012-11-14 Thread John McKown
Ah, saves me the "git status" to remove files from git which have been 
removed from the source.

On Wednesday, November 14, 2012 3:22:29 PM UTC-6, Thomas Ferris Nicolaisen 
wrote:
>
> I think you could just do a git add -A in steps 4c/d instead.

-- 




[git-users] Error while pushing Git repository to Github

2012-11-14 Thread Ankita Poovaiah
I have created ssh keys. While trying to push git repository to github it 
is showing this error "git push -u origin master
fatal: unable to connect to github.com:
github.com: Servname not supported for ai_socktype".
What do I need to do? 

--