[git-users] push error

2012-08-29 Thread ashu
What can be the reason of this error ?

ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git init
[sudo] password for ashu: 
Initialized empty Git repository in /home/ashu/Documents/git-dir/git1/.git/
ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ git commit -m first commit
fatal: Unable to create 
'/home/ashu/Documents/git-dir/git1/.git/index.lock': Permission denied
ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git commit -m first 
commit
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use git add to track)
ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git remote add origin 
https://github.com/ashutoshverma/drunken-ironman.git
*ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git push -u origin 
master
error: The requested URL returned error: 403 while accessing 
https://github.com/ashutoshverma/drunken-ironman.git/info/refs

fatal: HTTP request failed
*

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/rE74k7ry258J.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] push error

2012-08-29 Thread Michael Wang
the git commit has warned you nothing to commit (create/copy files and
use git add to track) and if you try git log, you will get someting like:
fatal: bad default revision 'HEAD'

git cannot commit an empty tree, so you should add at least one file for
git to track, try the following commands:

touch README
echo 'Hello world'  README
git add README
git commit -m first commit

then try to push again.

2012/8/29 ashu ashutove...@gmail.com

 What can be the reason of this error ?

 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git init
 [sudo] password for ashu:
 Initialized empty Git repository in /home/ashu/Documents/git-dir/git1/.git/
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ git commit -m first commit
 fatal: Unable to create
 '/home/ashu/Documents/git-dir/git1/.git/index.lock': Permission denied
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git commit -m first
 commit
 # On branch master
 #
 # Initial commit
 #
 nothing to commit (create/copy files and use git add to track)
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git remote add origin
 https://github.com/ashutoshverma/drunken-ironman.git
 *ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git push -u origin
 master
 error: The requested URL returned error: 403 while accessing
 https://github.com/ashutoshverma/drunken-ironman.git/info/refs

 fatal: HTTP request failed
 *

 --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/git-users/-/rE74k7ry258J.
 To post to this group, send email to git-users@googlegroups.com.
 To unsubscribe from this group, send email to
 git-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/git-users?hl=en.




-- 
Michael Wang
Unix/Linux Admin | Software Configuration Management
MSN: ylzc...@gmail.com
Blog: http://loveky2012.blogspot.com
命由己作,福由心生;积善之家,必有余庆;

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] push error

2012-08-29 Thread ashutosh verma
It is still giving the same error:

ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ touch README
ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ echo 'Hello world'  README
ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git add README
[sudo] password for ashu:
ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git commit -m first
commit
[master (root-commit) 1edf97b] first commit
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 README
ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git remote add origin
https://github.com/ashutoshverma/drunken-ironman.git
fatal: remote origin already exists.
ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git push -u origin master
error: The requested URL returned error: 403 while accessing
https://github.com/ashutoshverma/drunken-ironman.git/info/refs

fatal: HTTP request failed


On Wed, Aug 29, 2012 at 2:22 PM, Michael Wang ylzc...@gmail.com wrote:

 the git commit has warned you nothing to commit (create/copy files and
 use git add to track) and if you try git log, you will get someting like:
 fatal: bad default revision 'HEAD'

 git cannot commit an empty tree, so you should add at least one file for
 git to track, try the following commands:

 touch README
 echo 'Hello world'  README
 git add README
 git commit -m first commit

 then try to push again.

 2012/8/29 ashu ashutove...@gmail.com

 What can be the reason of this error ?

 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git init
 [sudo] password for ashu:
 Initialized empty Git repository in
 /home/ashu/Documents/git-dir/git1/.git/
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ git commit -m first
 commit
 fatal: Unable to create
 '/home/ashu/Documents/git-dir/git1/.git/index.lock': Permission denied
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git commit -m first
 commit
 # On branch master
 #
 # Initial commit
 #
 nothing to commit (create/copy files and use git add to track)
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git remote add origin
 https://github.com/ashutoshverma/drunken-ironman.git
 *ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git push -u origin
 master
 error: The requested URL returned error: 403 while accessing
 https://github.com/ashutoshverma/drunken-ironman.git/info/refs

 fatal: HTTP request failed
 *

 --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/git-users/-/rE74k7ry258J.
 To post to this group, send email to git-users@googlegroups.com.
 To unsubscribe from this group, send email to
 git-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/git-users?hl=en.




 --
 Michael Wang
 Unix/Linux Admin | Software Configuration Management
 MSN: ylzc...@gmail.com
 Blog: http://loveky2012.blogspot.com
 命由己作,福由心生;积善之家,必有余庆;

  --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To post to this group, send email to git-users@googlegroups.com.
 To unsubscribe from this group, send email to
 git-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/git-users?hl=en.


-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] push error

2012-08-29 Thread Michael Wang
No, this time is another error fatal: remote origin already exists. you
have already add that remote. No need and you cannot add it again.

just run *sudo git push -u origin master *

2012/8/29 ashutosh verma ashutove...@gmail.com

 It is still giving the same error:

 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ touch README
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ echo 'Hello world'  README
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git add README
 [sudo] password for ashu:
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git commit -m first
 commit
 [master (root-commit) 1edf97b] first commit
  1 files changed, 1 insertions(+), 0 deletions(-)
  create mode 100644 README

 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git remote add origin
 https://github.com/ashutoshverma/drunken-ironman.git
 fatal: remote origin already exists.

 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git push -u origin
 master
 error: The requested URL returned error: 403 while accessing
 https://github.com/ashutoshverma/drunken-ironman.git/info/refs

 fatal: HTTP request failed


 On Wed, Aug 29, 2012 at 2:22 PM, Michael Wang ylzc...@gmail.com wrote:

 the git commit has warned you nothing to commit (create/copy files
 and use git add to track) and if you try git log, you will get someting
 like:
 fatal: bad default revision 'HEAD'

 git cannot commit an empty tree, so you should add at least one file for
 git to track, try the following commands:

 touch README
 echo 'Hello world'  README
 git add README
  git commit -m first commit

 then try to push again.

 2012/8/29 ashu ashutove...@gmail.com

 What can be the reason of this error ?

 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git init
 [sudo] password for ashu:
 Initialized empty Git repository in
 /home/ashu/Documents/git-dir/git1/.git/
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ git commit -m first
 commit
 fatal: Unable to create
 '/home/ashu/Documents/git-dir/git1/.git/index.lock': Permission denied
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git commit -m first
 commit
 # On branch master
 #
 # Initial commit
 #
 nothing to commit (create/copy files and use git add to track)
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git remote add
 origin https://github.com/ashutoshverma/drunken-ironman.git
 *ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git push -u origin
 master
 error: The requested URL returned error: 403 while accessing
 https://github.com/ashutoshverma/drunken-ironman.git/info/refs

 fatal: HTTP request failed
 *

 --
 You received this message because you are subscribed to the Google
 Groups Git for human beings group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/git-users/-/rE74k7ry258J.
 To post to this group, send email to git-users@googlegroups.com.
 To unsubscribe from this group, send email to
 git-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/git-users?hl=en.




 --
 Michael Wang
 Unix/Linux Admin | Software Configuration Management
 MSN: ylzc...@gmail.com
 Blog: http://loveky2012.blogspot.com
 命由己作,福由心生;积善之家,必有余庆;

  --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To post to this group, send email to git-users@googlegroups.com.
 To unsubscribe from this group, send email to
 git-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/git-users?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To post to this group, send email to git-users@googlegroups.com.
 To unsubscribe from this group, send email to
 git-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/git-users?hl=en.




-- 
Michael Wang
Unix/Linux Admin | Software Configuration Management
MSN: ylzc...@gmail.com
Blog: http://loveky2012.blogspot.com
命由己作,福由心生;积善之家,必有余庆;

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] push error

2012-08-29 Thread Ryan Hodson
I believe the 403 error is a GitHub permissions issue. I don't think you
can push over https without some special setup. The easy solution is to use
SSH instead.

Try changing your remote to: ssh://
github.com/ashutoshverma/drunken-ironman.git
On Aug 29, 2012 4:11 AM, Michael Wang ylzc...@gmail.com wrote:

 No, this time is another error fatal: remote origin already exists. you
 have already add that remote. No need and you cannot add it again.

 just run *sudo git push -u origin master *

 2012/8/29 ashutosh verma ashutove...@gmail.com

 It is still giving the same error:

 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ touch README
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ echo 'Hello world'  README
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git add README
 [sudo] password for ashu:
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git commit -m first
 commit
 [master (root-commit) 1edf97b] first commit
  1 files changed, 1 insertions(+), 0 deletions(-)
  create mode 100644 README

 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git remote add origin
 https://github.com/ashutoshverma/drunken-ironman.git
  fatal: remote origin already exists.

 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git push -u origin
 master
 error: The requested URL returned error: 403 while accessing
 https://github.com/ashutoshverma/drunken-ironman.git/info/refs

 fatal: HTTP request failed


 On Wed, Aug 29, 2012 at 2:22 PM, Michael Wang ylzc...@gmail.com wrote:

 the git commit has warned you nothing to commit (create/copy files
 and use git add to track) and if you try git log, you will get someting
 like:
 fatal: bad default revision 'HEAD'

 git cannot commit an empty tree, so you should add at least one file for
 git to track, try the following commands:

 touch README
 echo 'Hello world'  README
 git add README
  git commit -m first commit

 then try to push again.

 2012/8/29 ashu ashutove...@gmail.com

 What can be the reason of this error ?

 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git init
 [sudo] password for ashu:
 Initialized empty Git repository in
 /home/ashu/Documents/git-dir/git1/.git/
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ git commit -m first
 commit
 fatal: Unable to create
 '/home/ashu/Documents/git-dir/git1/.git/index.lock': Permission denied
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git commit -m
 first commit
 # On branch master
 #
 # Initial commit
 #
 nothing to commit (create/copy files and use git add to track)
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git remote add
 origin https://github.com/ashutoshverma/drunken-ironman.git
 *ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git push -u origin
 master
 error: The requested URL returned error: 403 while accessing
 https://github.com/ashutoshverma/drunken-ironman.git/info/refs

 fatal: HTTP request failed
 *

 --
 You received this message because you are subscribed to the Google
 Groups Git for human beings group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/git-users/-/rE74k7ry258J.
 To post to this group, send email to git-users@googlegroups.com.
 To unsubscribe from this group, send email to
 git-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/git-users?hl=en.




 --
 Michael Wang
 Unix/Linux Admin | Software Configuration Management
 MSN: ylzc...@gmail.com
 Blog: http://loveky2012.blogspot.com
 命由己作,福由心生;积善之家,必有余庆;

  --
 You received this message because you are subscribed to the Google
 Groups Git for human beings group.
 To post to this group, send email to git-users@googlegroups.com.
 To unsubscribe from this group, send email to
 git-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/git-users?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To post to this group, send email to git-users@googlegroups.com.
 To unsubscribe from this group, send email to
 git-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/git-users?hl=en.




 --
 Michael Wang
 Unix/Linux Admin | Software Configuration Management
 MSN: ylzc...@gmail.com
 Blog: http://loveky2012.blogspot.com
 命由己作,福由心生;积善之家,必有余庆;

  --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To post to this group, send email to git-users@googlegroups.com.
 To unsubscribe from this group, send email to
 git-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/git-users?hl=en.


-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this 

Re: [git-users] push error

2012-08-29 Thread Martin Møller Skarbiniks Pedersen
On 29 August 2012 10:43, ashu ashutove...@gmail.com wrote:
 What can be the reason of this error ?

 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git init
 [sudo] password for ashu:
 Initialized empty Git repository in /home/ashu/Documents/git-dir/git1/.git/
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ git commit -m first commit
 fatal: Unable to create '/home/ashu/Documents/git-dir/git1/.git/index.lock':
 Permission denied

Why do you use sudo sometimes ?
*sudo* git init
but
git commit -m first commit

try without any sudo

/Martin

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] push error

2012-08-29 Thread Konstantin Khomoutov
On Wed, 29 Aug 2012 04:15:57 -0500
Ryan Hodson hodson.r...@gmail.com wrote:

 I believe the 403 error is a GitHub permissions issue. I don't think
 you can push over https without some special setup. The easy solution
 is to use SSH instead.
[...]

I beleive there's no any way to push over HTTPS to github.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] push error

2012-08-29 Thread Konstantin Khomoutov
On Wed, 29 Aug 2012 01:43:22 -0700 (PDT)
ashu ashutove...@gmail.com wrote:

 What can be the reason of this error ?
 
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git init
 [sudo] password for ashu: 
 Initialized empty Git repository
 in /home/ashu/Documents/git-dir/git1/.git/
 ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ git commit -m first
 commit fatal: Unable to create
 '/home/ashu/Documents/git-dir/git1/.git/index.lock': Permission
 denied ashu@ashu-G41MT-S2P:~/Documents/git-dir/git1$ sudo git commit
 -m first commit
The reason is that for some totally unknown reason you first create
your repository as root (and files created in the git's metadata
directory, named .git, get root:root as its owner/group and
appropriate permissions) and then you're trying to manipulate files in
this directory (`git commit`, in the end, does exactly this) using your
normal user credentials.

There's no sense to initialize *your personal* Git repository as root.
Note that there are really not many things to do on your machine you
need root privileges for; mainly they are limited to package management,
editing system configuration files and (re)starting daemons.

[...]

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] push error

2012-08-29 Thread Thomas Ferris Nicolaisen
On Wednesday, August 29, 2012 2:00:42 PM UTC+2, Konstantin Khomoutov wrote:

 On Wed, 29 Aug 2012 04:15:57 -0500 
 Ryan Hodson hodso...@gmail.com javascript: wrote: 

  I believe the 403 error is a GitHub permissions issue. I don't think 
  you can push over https without some special setup. The easy solution 
  is to use SSH instead. 
 [...] 

 I beleive there's no any way to push over HTTPS to github. 


They do actually support this since a couple of years: 
https://github.com/blog/642-smart-http-support 

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/iJf9mwnN4FMJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.