SVN 405 Method Not Allowed

前端 未结 11 1348
情书的邮戳
情书的邮戳 2021-01-30 12:30

I accidentally deleted a folder in SVN and added it back immediately. I ran into an issue with this and my solution ended up removing the folder completely from my local copy as

相关标签:
11条回答
  • 2021-01-30 12:51

    If you use code.google.com to host your Subversion repository.

    You know below things, right?

    If you plan to make changes, use this command to check out the code as yourself using HTTPS:
    
    # Project members authenticate over HTTPS to allow committing changes.
    svn checkout https://.../svn/trunk/ user-...
    
    When prompted, enter your generated googlecode.com password.
    Use this command to anonymously check out the latest project source code:
    
    # Non-members may check out a read-only working copy anonymously over HTTP.
    svn checkout http://.../svn/trunk/ ...-read-only
    

    The error you mentioned exactly you are using Non-members may check out a read-only working copy anonymously over HTTP status. Therefore, you can not commit or do anything so far.

    You must use Project members authenticate over HTTPS to allow committing changes thing.

    It will be fine now.

    0 讨论(0)
  • 2021-01-30 12:52

    I just fixed this in my own repository. I'm using TortoiseSVN on Windows, so I'm not sure exactly what commands this translates to on the command line, but here's what I did:

    The problematic folder is called lib, and it was due to be added.

    • First I undid the add, so that SVN was no longer paying attention to it.
    • Then I renamed it (to libs, not that that matters) using the Windows context menu, added it, and committed successfully.
    • Finally I renamed it back to lib using TortoiseSVN's context menu (this is probably important), and committed again.
    0 讨论(0)
  • 2021-01-30 12:52

    The currently added directory is already committed in the repository. So delete the directory in the repository and commit the same directory again.

    0 讨论(0)
  • 2021-01-30 12:53

    The quickest way for me to fix it was to duplicate the affected folder, and commit it with an alternative name. Then svn mv duplicateFolder originalFolder. Pretty easy.

    So, take folder1 and make a folder1Copy:

    svn delete folder1
    svn add folder1Copy
    

    Commit and update:

    svn mv folder1Copy/ folder1/
    

    Commit again and it's fixed.

    0 讨论(0)
  • 2021-01-30 12:56

    My guess is that the folder you are trying to add already exists in SVN. You can confirm by checking out the files to a different folder and see if trunk already has the required folder.

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