WINDOWS+GIT+TORTOISEGIT+COPSSH installation Tutorials and problem collection

Source: Internet
Author: User
Tags ssh account

Preparatory work:

1, Git-1.8.1.2-preview20130201.exe

Https://code.google.com/p/msysgit/downloads/list

2, Copssh_4.1.0_installer.exe

http://download.csdn.net/download/zzjzmdx/4636227

3, Tortoisegit-1.8.5.0-64bit.msi

https://code.google.com/p/tortoisegit/wiki/Download?tm=2

Server System: Windows Server 2003 SP2

Client system: Windows 7 SP1

Server-side installation and deployment

1. Install git

Choose a default installation here

Choose the third one here, not to convert to UNIX code style

Complete the installation

2. Installing SSH and configuring users

Install in the root directory, avoid spaces in the path, causing unnecessary trouble

Here is the password to set up SSH account

Prompt to add user via "Copssh Control Panel" after installation

Complete the installation

Start configuring the SSH user

With the Users tab selected, click the Add button to add the user

Select the user name, where you can select the "svccopssh" user that was set up when you just installed SSH, or you can create a new user for yourself, this tutorial creates a new Gitadmin user as an administrative account.

There are two more actions to complete after installation:

1, the Git installation directory D:\Program Files\git\libexec\git-core folder Git-upload-pack.exe, Git.exe, Git-receive-pack.exe and Git-upload-archive.exe These 4 files are copied to the installation path of SSH under D:\ICW\bin.

2. Copy the Git installation directory D:\Program Files\git\bin\libiconv-2.dll to D:\ICW\bin.

3. Connect to Git repository

Go to the Bin folder in the SSH installation directory, call the Ssh.exe file, and enter the following code:

"SSH [email protected] Your server name or IP address"

Type Yes

Enter password

See this interface to represent a successful connection. At this point you are connected to git via the SSH protocol.

4, build the library operation

When the login is complete, the actual path at this time is D:\ICW\home\GitAdmin

To build the library, proceed as follows:

mkdir testgit//Create Testgit folder

CD testgit//Enter Testgit folder

GIT init//repository initialization, will create a new library with Testgit for the library name

Touch First.txt second.txt//Create First.txt and Second.txt text documents

git Add. Add a file to Git

git config–global user.email "[email protected]"//Set Email address

git config–global user.name "Your name"//Set user name

Git commit–m "init"//Commit changes to Git

CD ~/.SSH//Enter the. SSH folder

Ssh-keygen–t rsa–c "[email protected]"//Generate public key, default name is Id_rsa

At this point, the server-side installation and configuration is complete.

Note: Git defaults to the clone version after modifying the master version of the information can not submit changes, such as the need to open permissions, to modify the. git/config file after adding the following code:

[Receive]

Denycurrentbranch = Ignore

Client Installation and Configuration

1. Install git

The installation steps are the same as the server side.

2, Installation Tortoisegit

Installation Complete

At this point in your computer right mouse button can see git has been integrated into the system shortcut operation.

3, Configuration Tortoisegit

First, set the value of SSH client in tortoisegit>settings>network to "D:\Program Files (x86) \git\bin\ssh.exe".

To create a new test local folder, right-click the git clone option, the dialog will pop up, enter the correct URL, select the Web, choose the local folder, and tap OK.

If the URL is correct, the input password interface will pop up and the library information will be cloned locally when it is entered correctly.

See success, congratulations, you have obtained the library information on the server.

Reproduced above http://blog.csdn.net/aaron_luchen/article/details/10498181

--------------------------------------------------------------------------------------------------------------- ----------------------------

Problem: Tortoisegit disconnected no supported authentication

Today, I found a project to get from a remote server, with Git no problem, and Tortoisegit error:
Disconnected:no Supported authentication methods available (server Sent:publickey)

Because of the conflict between Tortoisegit and Git. Corrected as follows:

1, Tortoisegit-Settings, Network

2. Set the SSH client to git\bin\usr\Ssh.exe

Then, Tortoisegit can work properly!

--------------------------------------------------------------------------------------------------------------- ----

In the graphical interface, the following error occurs when performing a pull operation.

You asked to pulling from the "origin" of the remote, but do not specify
A branch. Because This isn't the default configured remote
For your-branch, you must specify a branch on the command line.

Workaround:

Edit your.git/config

[branch "master"]  Remote = origin  merge = Refs/heads/master

Now you can simply git push and git pull.

-------------------------------------------------------------------------------

See which remote warehouses are currently in the project
[email protected] wirelessqa$ git remoteorigin
View Remote repositories
[email protected] wirelessqa$ git remote -vorigin     [email protected]***.com:xiaopeng.bxp/wirelessqa.git (fetch)origin     [email protected]***.com:xiaopeng.bxp/wirelessqa.git (push)
View Remote Warehouse Information
$ git remote -v <remote-name>
[email protected] wirelessqa$ git remote show origin* remote origin  Fetch URL: [email protected]****.com:xiaopeng.bxp/wirelessqa.git  Push  URL: [email protected]***.com:xiaopeng.bxp/wirelessqa.git  HEAD branch: master  Remote branch:    master tracked  Local branch configured for ‘git pull‘:    master merges with remote master  Local ref configured for ‘git push‘:    
To add a remote repository:
$ git remote add [remote-name] [url]
[email protected] robotium$ git remote add test git://github.com/paulboone/ticgit.git[email protected] robotium$ git remote -vorigin     https://github.com/RobotiumTech/robotium (fetch)origin     https://github.com/RobotiumTech/robotium (push)test     git://github.com/paulboone/ticgit.git (fetch)test     git://github.com/paulboone/ticgit.git (push)
To delete a remote repository:
$ git remote rm [remote-name]
[email protected] robotium$ git remote rm test[email protected] robotium$ git remote -vorigin     https://github.com/RobotiumTech/robotium (fetch)origin     https://github.com/RobotiumTech/robotium (push)
To modify a remote repository:
$ git remote set-url --push [remote-name] [newUrl]
Renaming a remote repository
$ git remote rename <old-remote-name> <new-remote-name>
Fetching data from a remote repository:
$git fetch [remote-name]

Description

    1. This command pulls all data that is not in your local repository to the remote repository. After the run is complete, you can access all the branches in the remote repository locally
    2. The fetch command simply pulls the remote data to the local repository and does not automatically merge into the current work branch until you are really ready to merge manually
To pull the remote repository:
$ git pull [remote-name] [本地分支名]

Description: Generally we get the code update is a git pull, the purpose is to crawl the data from the remote repository of the original clone, merged into the current branch in the working directory

To push a remote repository:
$ git push [remote-name] [本地分支名]

Description: This command completes the task as expected only if there are write permissions on the cloned server, or if no one else is pushing the data at the same time. If someone else has pushed a few updates before you push the data, your push will be dismissed. You have to crawl their updates to a local git pull and merge them into your project before you can push them again.

$git push origin test:master         // 提交本地test分支作为远程的master分支$git push origin test:test              // 提交本地test分支作为远程的test分支

WINDOWS+GIT+TORTOISEGIT+COPSSH installation Tutorials and problem collection

Related Article

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.