Tag Archives: 入门

bitbucket SSH快速入门指南

1.基本思路

生成私钥和公钥,把公钥的内容贴到bitbucket的账户选项设置那里,然后ssh-agent加载本地私钥。

2.linux下的步骤

2.1 生成密钥

ssh-keygen
ssh-agent /bin/bash
ssh-add ~/.ssh/id_rsa

然后ssh-add -l查看一下ssh-agent是否成功加载私钥,例如:

$ ssh-add -l
2048 7a:9c:b2:9c:8e:4e:f4:af:de:70:77:b9:52:fd:44:97 /Users/manthony/.ssh/id_rsa (RSA)

2.2 把公钥贴到账户ssh key那里

点击你的头像 -> “Account settings -> SSH keys.”把 “~/.ssh/idrsa.pub”内容复制到key那里,如下图: http://pic.yupoo.com/zhongyijun/CP6dT7kL/cKvj.jpg

对于windows,用git bash,类似,请参考以下官方网站的链接。

3.可能会出现的问题

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

一般原因是因为ssh-agent没有成功加载你的私钥。

graphviz examples

Table of Contents

patricia tree

digraph g {
graph [
#rankdir = LR
];

node [
fontsize = "20"
fontname = "Times-Italic"
];

edge [
];

##parent [
##label = "parent"
##fontcolor=red
##shape = plaintext
##];

##kid_node [
##label = "kid_node"
##fontcolor=red
##shape = plaintext
##];

nodei [
label = "'/i/' \,idx = 0"
shape = ellipse
];

nodeiism [
label = "'/i/ism/' \,idx = 3"
shape = ellipse
];

nodea1 [
label = "'a1' \,idx = 0"
shape = ellipse
];

kidsi [
label = "'/'"
shape = box
];

kidsa [
label = "'a'"
shape = box
];

kids0 [
label = "'\0'"
shape = box
];

kidsa1 [
label = "'/'"
shape = box
];

nodei -> kidsi[label = "kids"];
kidsi -> nodeiism[label = "node"];
kidsi -> kidsa[label = "brother"];
{rank = same;kidsi;kidsa;}
kidsa ->nodea1[label = "node"];

nodeiism ->kids0[label = "kids"];
nodea1 ->kidsa1[label = "kids"];

kids0 ->nodei[label = "node"];
kidsa1 ->nodei[label = "node"];
}

输出: http://pic.yupoo.com/zhongyijun/Corvv8Xi/k223V.png

digraph g {
graph [
#rankdir = LR
];

node [
fontsize = "20"
fontname = "Times-Italic"
];

edge [
];

##parent [
##label = "parent"
##fontcolor=red
##shape = plaintext
##];

##kid_node [
##label = "kid_node"
##fontcolor=red
##shape = plaintext
##];
nodei [
label = "'/i/' \,idx = 0"
shape = ellipse
];

nodeiism [
label = "'/i/ism/' \,idx = 3"
style=filled
color=red
shape = ellipse
];

nodea1 [
label = "'a1' \,idx = 0"
shape = ellipse
];

kidsi [
label = "'/'"
shape = box
];

kidsa [
label = "'a'"
shape = box
];

kids0 [
label = "'\0'"
shape = box
];

kidsa1 [
label = "'/'"
shape = box
];

nodei -> kidsi[label = "kids"];
kidsi -> nodeiism[label = "node"];
kidsi -> kidsa[label = "brother"];
{rank = same;kidsi;kidsa;}
kidsa ->nodea1[label = "node"];

nodeiism ->kids0[label = "kids"];
nodea1 ->kidsa1[label = "kids"];
kidsa1 ->nodei[label = "node"];

kids0 ->nodei[label = "node"];

{rank=min;nodei;}
{rank=max;kids0;}
}

输出: http://pic.yupoo.com/zhongyijun/CorvvmAZ/aTXth.png

digraph g {
graph [
#rankdir = LR
];

node [
fontsize = "20"
fontname = "Times-Italic"
];

edge [
];

parent [
label = "parent"
fontcolor=blue
shape = plaintext
];

kid_node [
label = "kid_node"
fontcolor=blue
shape = plaintext
];

nodei [
label = "'/i/' \,idx = 0"
shape = ellipse
];

nodeiism [
label = "'/i/ism/' \,idx = 3"
color=red
style=filled
shape = ellipse
];

nodea1 [
label = "'a1' \,idx = 0"
shape = ellipse
];

kidsi [
label = "'/'"
shape = box
];

kidsa [
label = "'a'"
shape = box
];

kids0 [
label = "'\0'"
shape = box
];

kidsa1 [
label = "'/'"
shape = box
];

nodei -> kidsi[label = "kids"];
kidsi -> nodeiism[label = "node"];
kidsi -> kidsa[label = "brother"];
{rank = same;kidsi;kidsa;}
kidsa ->nodea1[label = "node"];

nodeiism ->kids0[label = "kids"];
nodea1 ->kidsa1[label = "kids"];
kidsa1 ->nodei[label = "node"];

kids0 ->nodei[label = "node"];
{rank=min;nodei;}
{rank=max;kids0;kid_node;}

parent -> nodeiism;
kid_node ->nodeiism;
}

输出: http://pic.yupoo.com/zhongyijun/Corvvvsu/NG4g1.png

digraph g {
graph [
#rankdir = LR
];

node [
fontsize = "20"
fontname = "Times-Italic"
];

edge [
];

parent [
label = "parent"
fontcolor=blue
shape = plaintext
];

kid_node [
label = "kid_node"
fontcolor=blue
shape = plaintext
];

nodei [
label = "'/i/' \,idx = 0"
shape = ellipse
];

nodeiism [
label = "'/i/ism/' \,idx = 3"
color=red
style=filled
shape = ellipse
];

nodea1 [
label = "'a1' \,idx = 0"
shape = ellipse
];

kidsi [
label = "'/'"
shape = box
];

kidsa [
label = "'a'"
shape = box
];

kids0 [
label = "'\0'"
shape = box
];

kidsa1 [
label = "'/'"
shape = box
];

nodei -> kidsi[label = "kids"];
kidsi -> nodeiism[label = "node"];
kidsi -> kidsa[label = "brother"];
{rank = same;kidsi;kidsa;}
kidsa ->nodea1[label = "node"];

nodeiism ->kids0[label = "kids"];
nodea1 ->kidsa1[label = "kids"];
kidsa1 ->nodei[label = "node"];

kids0 ->nodei[label = "node"];
{rank=min;nodei;}
{rank=max;kids0;kid_node;}

parent -> nodeiism;
##{rank = same;parent;nodei;}
kid_node ->nodei;
##{rank = same;kid_node;nodeiism;}
}

输出: http://pic.yupoo.com/zhongyijun/Corvvngz/na1iz.png

digraph g {
graph [
#rankdir = LR
];

node [
fontsize = "20"
fontname = "Times-Italic"
];

edge [
];

nodei [
label = "'/i/' \,idx = 0"
shape = ellipse
];

nodeite [
label = "'/i/te' \,idx = 3"
shape = ellipse
];

nodeitest [
label = "'/i/test' \,idx = 5"
shape = ellipse
];

nodea1 [
label = "'a1' \,idx = 0"
shape = ellipse
];

nodeb1 [
label = "'b1' \,idx = 0"
shape = ellipse
];

kidsi [
label = "'/'"
shape = box
];

kidsb [
label = "'b'"
shape = box
];

kidsa [
label = "'a'"
shape = box
];

kidst [
label = "t"
shape = box
];

kids0 [
label = "'\0'"
shape = box
];

kidsb1 [
label = "'/'"
shape = box
];

kidsa1 [
label = "'/'"
shape = box
];

nodei -> kidsi[label = "kids"];
kidsi -> nodeite[label = "node"];
kidsi -> kidsb[label = "brother"];
{rank = same;kidsi;kidsb;}

kidsb ->nodeb1[label = "node"];
kidsb ->kidsa[label = "brother"];
{rank = same;kidsa;kidsb;}

kidsa ->nodea1[label = "node"];

nodeite ->kidst[label = "kids"];
kidst ->nodeitest[label = "node"];

nodeitest ->kids0[label = "kids"];
kids0 ->nodeite[label = "node"];

nodeb1 ->kidsb1[label = "kids"];
kidsb1 ->nodei[label = "node"];

nodea1 ->kidsa1[label = "kids"];
kidsa1 ->nodei[label = "node"];
}

输出: http://pic.yupoo.com/zhongyijun/CorvvJ6I/tXwqH.png

digraph g {
graph [
#rankdir = LR
];

node [
fontsize = "20"
fontname = "Times-Italic"
];

edge [
];

parent [
label = "parent"
fontcolor=red
shape = plaintext
];

kid_node [
label = "kid_node"
fontcolor=red
shape = plaintext
];

len [
label = "len = 12"
fontcolor = blue
shape = plaintext
];

nodei [
label = "'/i/' \,idx = 0"
shape = ellipse
];

nodeite [
label = "'/i/te' \,idx = 3"
shape = ellipse
];

nodeitest [
label = "'/i/test' \,idx = 5"
shape = ellipse
];

nodea1 [
label = "'a1' \,idx = 0"
shape = ellipse
];

nodeb1 [
label = "'b1' \,idx = 0"
shape = ellipse
];

kidsi [
label = "'/'"
shape = box
];

kidsb [
label = "'b'"
shape = box
];

kidsa [
label = "'a'"
shape = box
];

kidst [
label = "t"
shape = box
];

kids0 [
label = "'\0'"
shape = box
];

kidsb1[
label = "'/'"
shape = box
];

kidsa1 [
label = "'/'"
shape = box
];

nodei -> kidsi[label = "kids"];
kidsi -> nodeite[label = "node"];
kidsi -> kidsb[label = "brother"];
{rank = same;kidsi;kidsb;}

kidsb ->nodeb1[label = "node",len = 2.5];
kidsb ->kidsa[label = "brother"];
{rank = same;kidsa;kidsb;}

kidsa ->nodea1[label = "node",len = 2.5];

nodeite ->kidst[label = "kids"];
kidst ->nodeitest[label = "node"];

nodeitest ->kids0[label = "kids"];
kids0 ->nodeite[label = "node"];

nodeb1 ->kidsb1[label = "kids"];
kidsb1 ->nodei[label = "node"];

nodea1 ->kidsa1[label = "kids"];
kidsa1 ->nodei[label = "node"];

parent ->nodei;
{rank = same;parent;nodei;}
kid_node ->nodeite;
{rank = same;kid_node;nodeite;}

len ->nodei[style=invis];
{rank=same;len;nodei;}
}

输出: http://pic.yupoo.com/zhongyijun/Corvv480/tydlI.png

digraph g {
graph [
#rankdir = LR
];

node [
fontsize = "20"
fontname = "Times-Italic"
];

edge [
];

parent [
label = "parent"
fontcolor=red
shape = plaintext
];

kid_node [
label = "kid_node"
fontcolor=red
shape = plaintext
];

len [
label = "len = 12"
fontcolor = blue
shape = plaintext
];

nodei [
label = "'/i/' \,idx = 0"
shape = ellipse
];

nodeite [
label = "'/i/te' \,idx = 3"
shape = ellipse
];

nodeitest [
label = "'/i/test' \,idx = 5"
shape = ellipse
];

nodea1 [
label = "'a1' \,idx = 0"
shape = ellipse
];

nodeb1 [
label = "'b1' \,idx = 0"
shape = ellipse
];

kidsi [
label = "'/'"
shape = box
];

kidsb [
label = "'b'"
shape = box
];

kidsa [
label = "'a'"
shape = box
];

kidst [
label = "t"
shape = box
];

kids0 [
label = "'\0'"
shape = box
];

kidsb1 [
label = "'/'"
shape = box
];

kidsa1 [
label = "'/'"
shape = box
];

nodei -> kidsi[label = "kids"];
kidsi -> nodeite[label = "node"];
kidsi -> kidsb[label = "brother"];
{rank = same;kidsi;kidsb;}
{rank = min;nodei;}

kidsb ->nodeb1[label = "node",len = 2.5];
kidsb ->kidsa[label = "brother"];
{rank = same;kidsa;kidsb;}

kidsa ->nodea1[label = "node",len = 2.5];

nodeite ->kidst[label = "kids"];
kidst ->nodeitest[label = "node"];

nodeitest ->kids0[label = "kids"];
kids0 ->nodeite[label = "node"];

nodeb1 ->kidsb1[label = "kids"];
kidsb1 ->nodei[label = "node"];
nodea1 ->kidsa1[label = "kids"];
kidsa1 ->nodei[label = "node"];

parent ->nodeite;
{rank = same;parent;nodeite;}
kid_node ->nodeitest;
{rank = same;kid_node;nodeitest;}

len ->nodei[style=invis];
{rank=same;len;nodei;}
}

输出: http://pic.yupoo.com/zhongyijun/Corvw2Wi/hsLFP.png

digraph g {
graph [
#rankdir = LR
];

node [
fontsize = "20"
fontname = "Times-Italic"
];

edge [
];

parent [
label = "parent"
fontcolor = red
shape = plaintext
];

kid_node [
label = "kid_node"
fontcolor=red
shape = plaintext
];

len [
label = "len = 12"
fontcolor=blue
shape = plaintext
];

nodei [
label = "'/i/' \,idx = 0"
shape = ellipse
];

nodeite [
label = "'/i/te' \,idx = 3"
shape = ellipse
];

nodeitest [
label = "'/i/test' \,idx = 5"
shape = ellipse
];

nodea1 [
label = "'a1' \,idx = 0"
shape = ellipse
];

nodeb1 [
label = "'b1' \,idx = 0"
shape = ellipse
];

kidsi [
label = "'/'"
shape = box
];

kidsb [
label = "'b'"
shape = box
];

kidsa [
label = "'a'"
shape = box
];

kidst [
label = "t"
shape = box
];

kids0 [
label = "'\0'"
shape = box
];

kidsb1[
label = "'/'"
shape = box
];

kidsa1 [
label = "'/'"
shape = box
];

nodei -> kidsi[label = "kids"];
kidsi -> nodeite[label = "node"];
kidsi -> kidsb[label = "brother"];
{rank = same;kidsi;kidsb;}
{rank = min;nodei;}

kidsb ->nodeb1[label = "node",len = 2.5];
kidsb ->kidsa[label = "brother"];
{rank = same;kidsa;kidsb;}

kidsa ->nodea1[label = "node",len = 2.5];

nodeite ->kidst[label = "kids"];
kidst ->nodeitest[label = "node"];

nodeitest ->kids0[label = "kids"];
kids0 ->nodeite[label = "node"];

nodeb1 ->kidsb1[label = "kids"];
kidsb1 ->nodei[label = "node"];
nodea1 ->kidsa1[label = "kids"];
kidsa1 ->nodei[label = "node"];

parent ->nodeitest;
kid_node ->nodeitest;
{rank = max;parent;kid_node;kids0}

len ->nodei[style=invis];
{rank=same;len;nodei;}
}

输出: http://pic.yupoo.com/zhongyijun/CorvvVnC/mxKga.png

参考文献