git-clone...publickey denied
error generated on git clone...
root@taaha-Inspiron-N4050:~# git clone git@heroku.com:fierce-mesa-8849.git -o heroku Cloning into 'fierce-mesa-8849'... Permission denied (publickey). fatal: The remote end hung up unexpectedly i have tried everything but cant remove this error... please tell me what to do.... |
you need to create a public key
Code:
ssh-keygen I also notice you are root... it is best you use a 'standard' account try the git clone with your normal user account, then gen the key if needed and try again |
output is....
taaha@taaha-Inspiron-N4050:~$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/taaha/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: open /home/taaha/.ssh/id_rsa failed: Permission denied. Saving the key failed: /home/taaha/.ssh/id_rsa. dont know what to do.... |
Code:
ls -la ~/.ssh Code:
drwx------ 1 firerat firerat 84 Aug 15 07:22 . |
output is...
taaha@taaha-Inspiron-N4050:~$ ls -la ~/.ssh ls: cannot open directory /home/taaha/.ssh: Permission denied when i try with root....i get... root@taaha-Inspiron-N4050:~# ls -la ~/.ssh total 20 drwx------ 2 root root 4096 Aug 18 16:55 . drwx------ 12 root root 4096 Aug 18 22:55 .. -rw------- 1 root root 1675 Aug 18 22:57 id_rsa -rw-r--r-- 1 root root 407 Aug 18 22:57 id_rsa.pub -rw-r--r-- 1 root root 2652 Aug 17 21:03 known_hosts but on generating key and doing git clone same error(publickey) is generated... also i am running linux along with windows..... |
as root
Code:
chown -R taaha:taaha /home/taaha/.ssh |
thanks git clone command worked.....
but on the next command error generated again..... taaha@taaha-Inspiron-N4050:~$ git commit -am "changed greeting" fatal: Unable to create '/home/taaha/.git/index.lock': Permission denied also tried with root but didnt work |
when you run git clone it creates a new dir..
cd into that dir, make changes then do your commit the -m is handy for short commit messages, leave it off and you get a 'full' editor ( using $EDITOR ) -a commits ALL changes ( and only changes, new files will still not be 'seen' ) use Code:
git add file1 file2 path/to/file3 dir1 path/to/dir2 |
it worked....thanks so much bro......
|
All times are GMT -5. The time now is 12:00 PM. |