In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "how to configure SSH connection Git Server under Windows", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to configure SSH connection Git Server under Windows".
Rainbond is an application-centric open source PaaS that deeply integrates Kubernetes-based container management, ServiceMesh micro-service architecture best practices, multi-type CI/CD application construction and delivery, and multi-data center resource management technologies to provide full lifecycle solutions for cloud native applications.
Git can generally transfer data through local transmission, SSH, Git protocol, and HTTP protocol. This article is an open source PaaS Rainbond best practice article, which introduces how to configure SSH connection Git Server under windows.
Prepare to install Git
Windows7/Windows8 system
Download the Git 2.15 installation package (Git for Windows 32) (Git for Windows 64)
Installation
After the Git installation package is downloaded through the browser, you need to modify the locking properties of the file, especially .zip file and .chm file (otherwise opening chm will display 404). Right-click the downloaded file, select Properties, and then click the unlock button to confirm. As shown in the following figure:
Double-click the installation package file to start the installation. If there is a Windows blocking warning, you can allow it.
The installation wizard interface appears and follow the prompts to install. It is recommended to use the default configuration. Click next (Next).
Tip:
As shown in the picture, the options here can be checked according to individual needs.
When the installation is complete, open CDM or Git Bash and enter git or git-- version to try the git command.
Get SSH Key check
Open Git Bash and check if there are SSH key settings on this machine. Enter the following command:
$cd ~ / .ssh
If not, prompt: No such file or directory
If so, enter the following command under the path ~ / .ssh:
$ls # View the files in ~ / .ssh path $rm * # Delete the files in ~ / .ssh path
Create SSH Key
To generate a new SSH Key, enter the following command:
$cd ~ # ensure the current path under the home directory $ssh-keygen-t rsa-C "xxxxxx@yy.com" # it is recommended to enter your real and valid email address Generating public/private rsa key pair.Enter file in which to save the key (/ c/Users/xxxx_000/.ssh/id_rsa): # leave it empty and enter the Enter passphrase (empty for no passphrase): # enter the password (it can be empty Enter) Enter same passphrase again: # reconfirm the password (can be empty, enter) Your identification has been saved in / c/Users/xxxx_000/.ssh/id_rsa. # generated key Your public key has been saved in / c/Users/xxxx_000/.ssh/id_rsa.pub. # generated public key The key fingerprint is:e3:51:33:xx:xx:xx:xx:xxx:61:28:83:e2:81 xxxxxx@yy.com
SSH key has been generated, copy the contents of the id_rsa.pub file, and enter the following command:
$cat ~ / .ssh/id_rsa.pub # copy the output and add SSH Key to Git Server to Git Hub
Log in to GitHub, click on the avatar in the upper right corner, enter the setup center, and select SSH and GPG keys to start setting.
Customize the title of SSH key, add the id_rsa.pub content you just copied to key, and click Save.
Add to GitLabroot user
Log in to the GitLab app for the first time and use the root account, enter the home page, click the avatar in the upper right corner and select Settings to enter the setup center. Select SSH Keys to start setup.
Customize the title of SSH Key, add the id_rsa.pub content you just copied to key, and click Save.
Non-root users create an account
Add through root user
Sign up for an account
After logging in, go to the main page, click the avatar in the upper right corner and select Settings to enter the setup center. Select SSH Keys to start setup. Set up in the same way as root users
Configure the account $git config-- global user.name "your username" # Custom user name $git config-- global user.email "your_registered_github_Email" # set the email address (it is recommended to register the giuhub mailbox) to test whether the ssh keys is set up successfully. $ssh-T git@github.comThe authenticity of host 'github.com (192.30.252.129)' can't be established.RSA key fingerprint is 16:27:xx:xx:xx:xx:xx:4d:eb:df:a6:48.Are you sure you want to continue connecting (yes/no)? Yes # confirm whether you will continue to visit, enter yesWarning: Permanently added 'github.com,192.30.252.129' (RSA) to the list of known hosts.git basic operation
Create a new warehouse in GitHUb and copy the ssh path to the warehouse.
Open Git Bash and enter the following command:
# create directory $mkdir test$ cd test# initialize $git init# create hello.md file $echo "This is a ssh key test" > README.md# submit to local $git add. # submit all files under the current directory $git commit-m "add README.md" # submit record instructions # submit to github$ git remote add origin'# paste the newly copied warehouse ssh path $git push-u origin master#ssh key if you set the password, you will be prompted to output the password Enter passphrase for key'~ / .ssh/id_rsa':
Refresh the GitHub interface to view the README.md that has just been pushed to this library
GUI Clients
Git GUI is Git's built-in tool for submission and browsing. Git also supports other third-party clients to implement the same functions, such as SourceTree, GitHub Desktop, TortoiseGit, etc.
SourceTree
The Windows system supports SourceTree. Download and install SourceTree. Login is required during the installation process. You can sign up for an ATLASSIAN account or log in using a Google account. When the installation is complete, open sourcetree. As shown below:
{{site.data.alerts.callout_success}} if you use SSH for Git operation, click tools-> configure SSH key. Go to the system directory and find the id_rsa file generated above.
{{site.data.alerts.end}}
GitHub Desktop
The Windows system supports the use of GitHub Desktop, and the download and installation uses GitHub Desktop. The client is as follows:
The above is all the contents of the article "how to configure SSH connection Git Server under Windows". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.