How git connects to GitHub via SSH and how to add collaboration developers

Source: Internet
Author: User

Tag:git   gitssh   ssh    Collaborative development    

</pre><pre name= "code" class= "Java" >**********1. In executing GIT push Origin master command times the following error: [email protected ]/d/ilucky/message/code (Master) $ Git push origin masterusername for ' https://github.com ': Iluckysipassword for ' https:/ /[email protected] ': Counting objects:178, done. Delta compression using up to 4 threads.compressing objects:100% (100/100), Done.eWfrror:RPC failed; result=56, HTTP code = kib/satal:the Remote End hung up unexpectedlywriting objects:100% (123/123), 5.30 MiB | 13.00 kib/s, done. Total 123 (Delta), reused 0 (Delta 0) fatal:the remote end hung up unexpectedlyeverything up-to-date problem: Ewfrror:rpc FAI Led result=56, HTTP code = kib/s by Internet query, because Http.postbuffer value is small, to modify the Postbuffer. [email protected]/d/ilucky/message/code (master) $ git config--global http.postbuffer 24288000[email  Protected]/d/ilucky/message/code (master) $ git config--listcore.symlinks=falsecore.autocrlf=truecolor.diff= Autocolor.status=autocolor.branch=autocolor.interactive=truepack.packsizelimit=2ghelp.format=htmlhttp.sslcainfo=/bin/curl-ca-bundle.crtsendemail.smtpserver=/ bin/msmtp.exediff.astextplain.textconv=astextplainrebase.autosquash=trueuser.name=sidongxue[email  protected]http.postbuffer=24288000//Modified http.postbuffercore.repositoryformatversion=0core.filemode= falsecore.bare=falsecore.logallrefupdates=truecore.symlinks=falsecore.ignorecase=truecore.hidedotfiles= dotgitonlyremote.orgin.url=https://github.com/iluckysi/message.gitremote.orgin.fetch=+refs/heads/*:refs/ Remotes/orgin/*remote.origin.url=https://github.com/iluckysi/message.gitremote.origin.fetch=+refs/heads/*:refs /remotes/origin/*[email protected]/d/ilucky/message/code (master) $ Git push origin masterusername for ' https:// Github.com ': Iluckysipassword for ' https://[email protected] ': Counting objects:178, done. Delta compression using up to 4 threads. Compressing objects:100% (100/100), done. Writing objects:100% (123/123), 5.30 MiB | 0 bytes/s, done. Total 123 (dELTA), reused 0 (Delta 0) After the configuration, continue to execute the GIT push Origin Master command, there are still problems, the Internet to query again, It is suggested that the HTTPS mode can be changed to SSH by Internet. Logging on to GitHub discovers that the Reomte URL has three connections: Https,ssh and Svn,git connect to GitHub by default using HTTPS. [email protected]/d/ilucky/message/code (master) $ git Remote Set-url origin [email protected]:iluckysi/ Message.git[email protected]/d/ilucky/message/code (master) $ Git push origin masterreceived disconnect from 192.30.252.129:11:bye byefatal:could not read from remote repository. Please do sure you have the correct access rightsand the repository exists. After you modify, continue with the GIT push Origin Master command, or have a problem, go online again Line query, the original via SSH connected to GitHub through key. [email protected]/d/ilucky/message/code (Master) $ ssh-keygen-t rsa-c "[email protected]" Generating public /private RSA key pair. Enter file in which to save the key (/C/USERS/ZHANGMENGJIAO/.SSH/ID_RSA):/c/users/zhangmengjiao/.ssh/id_rsa already Exists. Overwrite (y/n)? Yenter passphrase (empty for no passphrase): Enter the GitHub password enter same passphrase again: Enter GitHub secretYards your identification has been saved In/c/users/zhangmengjiao/.ssh/id_rsa. Your public key has been saved in/c/users/zhangmengjiao/.ssh/id_rsa.pub.the key fingerprint is:ce:eb:cd:8e:5e:80:e9:3b:                 d6:f8:c2:75:63:d2:28:0d [email protected]the key ' s randomart image is:+--[RSA 2048]----+|                 ||                 ||      ||      Eo | |     Ooso | | ..     o=.= | | ..     =o+.      || *..     *       || .. **.+ |+-----------------+[email protected]/d/ilucky/message/code (master) generates a key, a. SSH directory is generated in the/c/users/user/directory. , add the contents of the. SSH directory to the id_rsa.pub file according to git 2-1 images added to GitHub, add finished, execute the instruction again, OK,!$ git push origin masterenter passphrase for key ' /c/users/zhangmengjiao/.ssh/id_rsa ': Counting objects:178, done. Delta compression using up to 4 threads.compressing objects:100% (100/100), done. Writing objects:100% (123/123), 5.30 MiB | 44.00 kib/s, done. Total 123 (Delta), reused 0 (Delta 0) to [Email protected]:iluckysi/message.git 8dae8c8. F6DC5B2 mAster-master[email protected]/d/ilucky/message/code (master) $?????????? Question: What is the difference between https,ssh and SVN? The official recommendation is to use HTTPS. Reference http://stackoverflow.com/questions/11041729/ Why-does-github-recommend-https-vs-ssh**********2. Add a collaboration developer. Follow git to organize 2-2 images to add collaboration developers. NOTE: Collaboration developers also have their own GitHub account, The local GitHub workspace. Collaborative collaboration The developer uses the directive to clone a copy of the Administrator's project, and the URL of the clone is the project URL of the administrator. This allows collaboration developers to work on projects in their own workspaces. In addition to the above cooperation, there is a way to cooperate: Through the fork and pull request. Follow git to organize your 2-3 images fork The Administrator's project, hit a branch of the admin project on your GitHub, and then clone a project on GitHub to a local workspace. This allows you to perform various operations on the project, which does not affect the project on the administrator GitHub. If one day your task is completed, you can share it with the administrator by sending a pull request, and if the administrator thinks there is no problem, you can merge, if you feel the problem, can be discussed. Reference http://tech.marsw.tw/blog/2013/08/17/git-notes-github-n-person-cooperation-settings/


How git connects to GitHub via SSH and how to add collaboration developers

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.