Step 1: Set the login token on Github:
菜单:Settings => Developer settings => Personal access tokens
Press the Generate new token button
Check the permissions according to your needs. If you don’t understand, just click on them all.
After creation, you will enter a new page. There is an encrypted string in the page, which is the login token. This string can only be seen once in your life, and you will never see it after the page is refreshed, so just to be on the safe side , Copy it down for the next steps.
Step 2: Configure the local Git account:
Run CMD using super pipe and execute:
git config --global user.email "your mailbox@扣扣.com"
git config --global user.name "your username"
Step 3: Configure local SSH
Run CMD using super pipe and execute:
ssh-keygen -t rsa -C "Your email@扣扣.com""
This operation will generate a file named **.pub in the directory and copy all the contents inside.
Step 4: Configure Github SSH
Menu: Settings => SSH keys
Press the New SSH Key button
Paste the content copied in step 3 into it, start a title, and save it.
Step 5: Configure Goland's github
Close all Goland windows and reopen
菜单:File=>Settings=>Version Control=>Github
In the window, use the username (please note that it is not the mailbox) and Github Token to log in, which is the encrypted string copied in the first step.
Step 6: Configure the Github repository address of the Golf Code
菜单:VCS=> Import into Version Control => Share Project Github
Fill in the name of your project directly,
Example: gt
Step 7: Upload to Github
Right click on your project: Git=>Commit Directory => commit = >commit
Right click on your project: Git=>Repository=>Push
OK