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 <[email protected]> > 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 <[email protected]> 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 <[email protected]> >> >>> 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 [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> 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: [email protected] >> 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 [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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: [email protected] 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
