Git - Permission denied (publickey)
2015-09-13 22:46
375 查看
http://stackoverflow.com/questions/2643502/git-permission-denied-publickey
I'm on Mac Snow Leopard and I just installed git.
I just tried
but that gives me this error.
What am I missing?
I've also tried doing
no passphase but still same error.
-----------------------------------------------------------------------------------------------------------------------
This info is for working on theChaw but can be applied to all other git repositories which support ssh pubkey authentications. (see gitolite,
gitlab or github for example)
first start by setting up your own public/private key pair set. This can use either dsa or rsa, so basically any key you setup will work. On most systems you can use ssh-keygen.
But first you want to make sure you cd into your .ssh directory. Open up the terminal and run:
next you need to copy this to your clipboard.
On OSX run:
On Linux run:
Add your key to your account via the website.
finally setup your git config
Thats it you should be good to clone and checkout.
Further information can be found on https://help.github.com/articles/generating-ssh-keys (thx
to @Lee Whitney)
I'm on Mac Snow Leopard and I just installed git.
I just tried
git clone git@thechaw.com:cakebook.git
but that gives me this error.
Initialized empty Git repository in `/Users/username/Documents/cakebook/.git/` Permission denied (publickey). fatal: The remote end hung up unexpectedly
What am I missing?
I've also tried doing
ssh-keygenwith
no passphase but still same error.
-----------------------------------------------------------------------------------------------------------------------
This info is for working on theChaw but can be applied to all other git repositories which support ssh pubkey authentications. (see gitolite,
gitlab or github for example)
first start by setting up your own public/private key pair set. This can use either dsa or rsa, so basically any key you setup will work. On most systems you can use ssh-keygen.
But first you want to make sure you cd into your .ssh directory. Open up the terminal and run:
cd ~/.ssh && ssh-keygen
next you need to copy this to your clipboard.
On OSX run:
cat id_rsa.pub | pbcopy
On Linux run:
cat id_rsa.pub | xclip
Add your key to your account via the website.
finally setup your git config
git config --global user.name "bob"
git config --global user.email bob@...(don't forget to restart your command line to make sure the config is reloaded)
Thats it you should be good to clone and checkout.
Further information can be found on https://help.github.com/articles/generating-ssh-keys (thx
to @Lee Whitney)
相关文章推荐
- LintCode Flip Bits
- docker常用命令
- Linux下可执行文件格式详解
- 05字符串格式化符号含义以及转义符号含义
- XFire发布Web Services
- 苹果开发者帐号三种类型的区别
- Sublime Text2使用教程
- axure & Markman学习总结
- LeetCode -- Add Digits
- Java中的反射机制
- android调用手机相机、相册,设置头像
- 快速生成findviewbyid
- js用addeventlistener绑定事件,阻止默认事件。
- 【poj1331】确定进制
- 堆与栈的区别
- HTML&CSS Learning Notes 2 (Additional)
- HDU 5444 Elven Postman 解题报告(水题)
- Java记录 -31- Java数组
- Struts2配置
- ThinkPHP使用Memcached