Tortoisegit asking password

后端 未结 16 1415
栀梦
栀梦 2020-12-04 11:10

I just started to work on Git. I use windows 7 and has installed msysgit(1.7.8) and Tortoisegit(1.7.6). The repository is created on Linux server which is accessible thru LA

相关标签:
16条回答
  • My colleague solved the problem. Steps:

    1. Right click -> TortoiseGit -> Settings -> Network
    2. SSH client was pointing to C:\Program Files\TortoiseGit\bin\TortoisePlink.exe
    3. Changed path to C:\Program Files (x86)\Git\bin\ssh.exe

    Alternative Path: C:\Users\...\AppData\Local\Programs\Git\usr\bin\ssh.exe

    0 讨论(0)
  • 2020-12-04 11:40

    One way to do this is

    • generate a keypair using PuttyGen, (or import into .ppk if you already have a key)
    • load the private key to peagent
    • import public key to you gitosis server (supply your public key to your admin)
    • and then use plink as SSH client

    plink works natively with peagent to retrieve the loaded key.

    you can find plink.exe along with peagent and other goodies in standard putty distribution

    to use it go to:

    TortoiseGit Settings -> Network -> SSH client .

    by default this contains path to TortoisePlink.exe, instead of that give path to plink.exe

    Alternatively you can use ssh(.exe) in msys(git) distribution but then you cannot use private key in .ppk format/Peagent combination. You either need to export your key to OpenSSH format via PuttyGen or create a keypair using ssh-keygen instead.

    0 讨论(0)
  • 2020-12-04 11:42

    Saving username and password with TortoiseGit

    Saving your login details in TortoiseGit is pretty easy. Saves having to type in your username and password every time you do a pull or push.

    1. Create a file called _netrc with the following contents:

      machine github.com
      login yourlogin
      password yourpassword

    2. Copy the file to C:\Users\ (or another location; this just happens to be where I’ve put it)

    3. Go to command prompt, type setx home C:\Users\

    Note: if you’re using something earlier than Windows 7, the setx command may not work for you. Use set instead and add the home environment variable to Windows using via the Advanced Settings under My Computer.

    CREDIT TO: http://www.munsplace.com/blog/2012/07/27/saving-username-and-password-with-tortoisegit/

    0 讨论(0)
  • Unfortunately, on my machine with Windows 8 the solution with repointing SSH client didn't work. Solution that solved the problem for me is here: http://www.munsplace.com/blog/2012/07/27/saving-username-and-password-with-tortoisegit/

    0 讨论(0)
  • 2020-12-04 11:43

    Please not the URL of the repo remote origin can cause this problem. I had an old repo that worked perfectly and a new one I just cloned that was asking me for password.

    Upon comparing the information in Settings > Git > Remote > Url I saw that the one which worked had:

    git@github.com:githubAccount/repoName.git

    The new one that did not work had an https address.

    Please see screenshot below as well.

    0 讨论(0)
  • 2020-12-04 11:43

    Tortoise GIT DOS command line stopped asking for my password once I placed my private and public keys in C:\Users\.ssh dir. I am on Windows 7.

    0 讨论(0)
提交回复
热议问题