Skip to content

Pull not prompting for authentication when scripted #760

@ChipJust

Description

@ChipJust
  • I was not able to find an open
    or closed issue
    matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? 32-bit or 64-bit? Include the
    output of git version as well.

    64-bit

$ git --version
git version 2.8.2.windows.1
  • Which version of Windows are you running? 32-bit or 64-bit?

Windows 8.1 64-bit

  • What options did you set as part of the installation? Or did you choose the
    defaults?

Defaults

  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

I did not have the problem when using version 1.9.5.
A coworker sees this problem with 2.5.0.

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Running the script from the windows CMD shell.

This script can recreate the issue, when you run it from a git directory.

def git_pull():
    import os
    import subprocess
    r = None
    try:
        r = subprocess.check_output(
                    ['git', 'pull'],
                    cwd=os.getcwd(),
                    stderr=subprocess.STDOUT).decode('ascii').strip()
    except Exception as e:
        print (e)
        print (e.output.decode('ascii'))
    print (r)
  • What did you expect to occur after running these commands?

I expected to be prompted for my password and then that git would update the repository.

  • What actually happened instead?

Script gives this output

Command '['git', 'pull']' returned non-zero exit status 1
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

None
  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

The remote is using ssh://. Not sure about what happens with other protocols.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions