windows下使用git和github建立远程仓库
2017-10-21 22:41
459 查看
(查看附件)
(01)Generating a new SSH key
Open Git
Bash(rootpath:C:\Users\Administrator)
Paste the text below, substituting in your GitHub email address.
$ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
This creates a new ssh key, using the provided email as a label.
Generating public/private rsa key pair.
When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location.
Enter a file in which to save the key (/c/Users/you/.ssh/id_rsa):[Press
enter]
At the prompt, type a secure passphrase. For more information, see "Working
with SSH key passphrases".
Enter passphrase (empty for no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]
(02)Generating a new SSH key
Adding your SSH key to the ssh-agent
Before adding a new SSH key to the ssh-agent to manage your keys, you should have checked
for existing SSH keys and generated
a new SSH key.
If you have GitHub
Desktop installed, you can use it to clone
repositories and not deal with SSH keys. It also comes with the Git Bash tool, which is the preferred way of running git commands
on Windows.
Ensure the ssh-agent is running:
If you are using the
Git Shell that's installed with GitHub Desktop, the ssh-agent should be running.
If you are using another
terminal prompt, such as Git for Windows, you can use the "Auto-launching the ssh-agent" instructions in "Working
with SSH key passphrases", or start it manually:
# start the ssh-agent in the background
$eval $(ssh-agent -s)
Agent pid 59566
.
Add your SSH private key to the ssh-agent. If you created your key with a different name, or if you are adding an existing key that has a different name, replace id_rsa in
the command with the name of your private key file.
$ssh-add ~/.ssh/id_rsa
.
(03)Add the SSH key to your GitHub account
(04)Create remote GitHub project
(05)Create locak repertory(The name need same with remote repertory )
(05)Configure account
(05)Conneation local repertoy to remote repertory
Force connection:
git push -f machine master
push to remote repertory for save name and password:
git config --global credential.helper "store"
相关文章推荐
- windows下使用git和github建立远程仓库
- windows下使用git和github建立远程仓库
- windows下使用git和github建立远程仓库
- windows下使用git和github建立远程仓库
- windows下使用git和github建立远程仓库
- windows下git的安装、配置与操作(六)——远程仓库(建立与github的联系)
- git使用(2) --在github上建立远程仓库
- 如何使用git命令同步代码到github或提交到多个远程仓库
- 使用git建立远程仓库,让别人git clone下来
- windows下使用GUI 把本地代码提交到git远程仓库
- windows下使用GUI 把本地代码提交到git远程仓库
- windows下使用git及github仓库管理项目 入门
- 如何在windows下使用git及github仓库管理项目
- 如何在windows下使用git及github仓库管理项目
- git命令与github使用(转主要看向远程仓库推内容)
- 使用Git命令从Github远程仓库更新项目
- 使用git建立远程仓库,让别人git clone下来
- 如何在windows下使用git及github仓库管理项目
- windows下使用git,如何保存push到远程仓库时使用的密码
- 使用Git命令从Github远程仓库更新项目