用git cmd pull 或push 时提示密码错误的解决方法
来源:互联网 发布:照片变成素描的软件 编辑:程序博客网 时间:2024/06/18 12:23
有时候准备pull的时候却发现密码怎么输也输不对,提示的信息是没有权限或者密码错误,如下
1
2
3
4
5
Warning: Permanently added the RSA host key
for
IP address
'192.30.252.131'
to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
如果出现以上类似的报错提示的话不妨试一下生成ssh-key的方法。步骤如下
在终端输入
1
ssh-keygen -t rsa -C
"Bear Xiong"
//注意。Bear Xiong为用户名
如果执行成功。返回
1
2
Generating
public
/
private
rsa key pair.
Enter file in which to save the key (/home/forwhat.cn/.ssh/id_rsa):
后面的提示都可以直接回车
1
2
3
4
Your identification has been saved in /Users/robin/.ssh/id_rsa.
Your
public
key has been saved in /Users/robin/.ssh/id_rsa.pub.
//注意这一行是key存放的地址,带会会用到
The key fingerprint is:
ee:c6:b9:1b:1c:b8:7d:81:fa:32:26:ae:1c:67:99:49 Bear Xiong
再次回车。
1
2
3
4
5
6
7
8
9
10
11
12
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| |
| o |
| + . S |
| . = . o |
| o + +o.o |
|E o . o.=+. |
|.+ ==+ooo. |
+-----------------+
这样SSH key就生成了。
1
vi /Users/robin/.ssh/id_rsa.pub
把刚才上面显示的存储的地址放在vi编译器里运行会生成如下代码
1
2
3
4
5
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMbtcXaDkr3mHdXnwXx77sD0ssiryhr6O+Y/1awcj3JFHdZMrjQ2P5ZGX
DWGMRmLYED29PGbgJf99tG1nsy0hVkeKS4VPegIuQJKtZNe9Ila/oBHFDFTxDXzG9AEMGnxPpfLiwYeXDZDU8uSe3CiSJRz
HP3rBjsnuBSnXf431UXsYzFOBtu0DcKGR2ez41BngI+pcR8fxKoGfSUcNvrRM7Wh3nC3wZ+prwLEnVFuV4JLq/f2nrJMg2Q
FTd2xV2hpmiXMOqI0h5z/w3vOvvo1+xSKvIXLhjqvoHoyoj8oDkOycZeaOASJhbOT+6xvTuGutM/3SDoFkFzHjL34CnGLyX
Bear Xiong
把刚才复制的贴到git的公钥那一栏里,就ok了。
本文转载至:http://blog.it985.com/2701.html
0 0
- 用git cmd pull 或push 时提示密码错误的解决方法
- 用git cmd pull 或push 时提示密码错误的解决方法
- git pull/push项目的时候总是提示要输入用户名密码的解决方案
- git pull/push时提示输入账号密码之免除设置
- git免密码pull,push
- git免密码 pull push
- git pull和git push总要输密码的原因
- Git pull、 push 操作无需输密码的方法
- Git pull、 push 操作无需输密码的方法
- git 每次clone/pull/push码云都要输入密码的解决方案
- 在使用Git push或pull代码的时候,总是要输入用户名和密码的问题
- 解决git每次pull或者push时输入密码问题
- git pull push没有指定branch报错的解决方法
- git pull push没有指定branch报错的解决方法
- git pull push没有指定branch报错的解决方法
- GIT PUSH/PULL时总需要输入用户名密码的解决方案
- git无需密码进行push/pull
- Git pull、push 免账号密码输入
- stm32+ADs1246
- org.apache.ibatis.binding.BindingException原因总结
- 第五章 编写程序---超强力方法
- Windows下Python2.x与Python3.x共存安装
- 浅谈Android之Activity相关介绍
- 用git cmd pull 或push 时提示密码错误的解决方法
- JavaScript-基础(一)
- 构造函数
- PHP源代码数组统计count分析
- 共同的子序列
- 欢迎使用CSDN-markdown编辑器
- nginx SSL的几个步骤
- Android自定义预定日历,并且显示阴历 (修改版)
- 理解HTTP协议