GitHub FAQ "Go to Baidu Know"

Source: Internet
Author: User

1 git config--global user.name "Your Real name"
2 git config--global user.email [email protected]

Git init

git Add.

Git commit-m ' Test '
git remote add origin [email protected]:xxx/xxx.git 3 Git push-u Origin master

Some of the issues that you may encounter are resolved:
If you enter Git remote add origin [email protected]:d Jqiang (GitHub account name)/gitdemo (project name). Git
Tip Error Message: Fatal:remote origin already exists.
The solution is as follows:
1. First enter GIT remote RM origin
2, then enter the GIT remote add origin [email protected]:d Jqiang/gitdemo.git will not error!
3. If you enter GIT remote RM origin or an error, error:could not remove config section ' Remote.origin '. We need to modify the contents of the Gitconfig file
4. Find your GitHub installation path, mine is C:\Users\ASUS\AppData\Local\GitHub\PortableGit_ca477551eeb4aea0e4ae9fcd3358bd96720bb5c8\ etc
5, find a file named Gitconfig, open it to the [remote "origin"] that line to delete the good!
If you enter $ ssh-t [email protected]
An error message appears: Permission denied (publickey).Because the newly generated key cannot join SSH, it will cause the connection to not be on GitHub.
The solution is as follows:
1, first enter $ ssh-agent, and then enter $ Ssh-add ~/.ssh/id_key, so you can.
2, if still do not, enter Ssh-add ~/.ssh/id_key command after the error could not open a connection to your authentication agent. The workaround is key with the Git GUI SSH tool Generated, so that when the key is stored directly in SSH, do not need to ssh-add command to join, and other user,token and other configurations are done with the command line.
3, it is best to check if you copy the contents of the Id_rsa.pub file there is no extra space or blank lines, some editors will help you add these.
If you enter a GIT push origin master
Tip error message: error:failed to push som refs to ....
The solution is as follows:
1. First enter the GIT pull Origin master//start the remote server github file down
2. Then enter $ GIT push origin master
3. Iferror FATAL:COULDN ' t find remote ref Masteror fatal: ' Origin ' does not appear to be a git repository andfatal:could not read from remote repository.

Note: Before you push the data to the remote server, you need to manually establish a repository on GitHub, otherwise you will always be reported fatal:could not read from remote repository. Error
4. You need to re-enter git remote add [email protected]:d Jqiang/gitdemo.git
The process of using Git to create a project locally
$ makdir ~/hello-world //Create a project Hello-world
$ cd ~/hello-world //Open this project
$ git init //initialization
$ Touch README
$ git Add Readme //Update Readme file
$ git commit-m ' first commit ' //Submit update and Comment message "First commit"
$ git Remote add origin [email protected].com:defnngj/hello-world.git //Connect remote GitHub Project
$ Git push-u origin master //update local project to GitHub project

GitHub FAQ "Go to Baidu Know"

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.