Github权限认证(创建一个项目版本库后遇到的权限问题)
编程技术  /  houtizong 发布于 3年前   88
git config --global user.name "你在github上的用户名" git config --global user.email 注册的邮件地址mkdir ~/.sshcd ~/.ssh ssh-keygen -t rsa -C "注册的邮件地址"cat id_rsa.pub
Global setup: Set up git git config --global user.name "user_name" git config --global user.email ×××@×××.com Add your public key Next steps: mkdir project_name cd project_name git init touch README git add README git commit -m 'first commit' git remote add origin [email protected]:user_name/project_name.git git push -u origin master Existing Git Repo? cd existing_git_repo git remote add origin [email protected]:user_name/project_name.git git push -u origin master Importing a Subversion Repo? Click here When you're done: Continue
“Permission denied (publickey).fatal: The remote end hung up unexpectedly”
$ cd ~/.ssh
$ ls# 显示来当前目录下的所有子目录# configid_rsaid_rsa.pubknown_hosts$ mkdir key_backup# 在当前目录下创建一个叫做"key_backup"的子目录$ cp id_rsa* key_backup# 备份以前的key文件到上面新建的文件夹中$ rm id_rsa*# 删除旧的key文件
$ ssh-keygen -t rsa -C "[email protected]"# 使用一个私人的email地址,来生成一个ssh key# 生成 公开/私有 的一对key(Generating public/private rsa key pair.)# 输入要保存key文件的目录(enter键 使用括弧里面的默认设置)(/Users/your_user_directory/.ssh/id_rsa):<press enter># 然后输入一个密码(passphrases)这个密码可以不用输入,直接回车就可以了,要不然每次提交代码都要输入密码Enter passphrase (empty for no passphrase):<enter a passphrase>Enter same passphrase again:<enter passphrase again>
Your identification has been saved in /Users/your_user_directory/.ssh/id_rsa.Your public key has been saved in /Users/your_user_directory/.ssh/id_rsa.pub.The key fingerprint is:01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db [email protected] key's randomart image is:+--[ RSA 2032]----+| .+ + || ssssssss || = * * || o = + || ssss . || o oss || o .sE || || |+-----------------+
$ ssh -T [email protected] to ssh to githubWhich should give you this:The authenticity of host 'github.com (207.97.227.239)' can't be established.RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.Are you sure you want to continue connecting (yes/no)?Don’t worry, this is supposed to happen. Type “yes”.Hi username! You've successfully authenticated, but GitHub does not provide shell access.Having problems?
请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!
技术博客集 - 网站简介:
前后端技术:
后端基于Hyperf2.1框架开发,前端使用Bootstrap可视化布局系统生成
网站主要作用:
1.编程技术分享及讨论交流,内置聊天系统;
2.测试交流框架问题,比如:Hyperf、Laravel、TP、beego;
3.本站数据是基于大数据采集等爬虫技术为基础助力分享知识,如有侵权请发邮件到站长邮箱,站长会尽快处理;
4.站长邮箱:[email protected];
文章归档
文章标签
友情链接