Skip to content

403 Responses Can Cause the LFS Client to Loop Infinitely #993

Closed

Description

@WillHipschman

The LFS client retries 403 response codes.

Because the LFS server and the git server can be separate endpoints, it is possible that a user has permission for the git server but not the LFS server.

In this case, if there is a credential manager installed, the credentials will not be reset, and LFS will use them on each subsequent request without ever invalidating them.

We should add a limit on the number of times LFS retries, or handle 403s in a smarter way.

Activity

  1. WillHipschman commented on Feb 11, 2016

    @WillHipschman
    Author

    I was able to fix this on the server by making sure that InfoRefs receive-pack calls always return the same exception that LFS calls do.

    The issue still exists in the client though.

  2. technoweenie commented on Feb 11, 2016

    @technoweenie
    Contributor

    There should be a limit already, but you're clearly hitting a case that doesn't have one. Can you replicate this somehow?

  3. WillHipschman commented on Feb 13, 2016

    @WillHipschman
    Author

    Yeah, the repro is

    1. Create an account at https://www.visualstudio.com/en-us/products/visual-studio-team-services-vs.aspx
    2. Create a git project and clone the repo locally
    3. Set up LFS and push the .gitattributes file
    4. Set deny permissions on the repo and master branch (http://stackoverflow.com/questions/28134314/protecting-a-git-branch-in-visual-studio-online)
    5. Try to push an LFS object.

    I can fix this, but it won't happen until next week sometime. I just wanted to make sure it's recorded as a known issue :)

  4. ttaylorr commented on May 29, 2018

    @ttaylorr
    Contributor

    This can be closed by: #2516.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions