-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Git LFS Troubleshooting
Be edited this page Nov 23, 2022
·
5 revisions
These are a few common issues that come up when cloning or pushing LFS files fails.
Cloning the repository or pulling LFS files fails with a "Forbidden" error or other authentication error
- Verify you are using your GitHub username and personal token, not your GitHub password.
- Verify that if you are copying your personal token from a text file that you are not including an extra space or tab. You can paste your token in a text editor to verify it doesn't have any extra spaces at the front or end.
- Verify the personal token in your password manager is correct. If using Windows, these credentials can generally be found in your
Windows Credential Manager
with a name that includes the URL found in the.lfsconfig
file at the root of the repository. At the time of writing, the o3de repo entry has a name similar togit:https://d3df09qsjufr6g.cloudfront.net/api/v1
. Keep in mind, we use different LFS URLs for each repository. - Verify you can authenticate with GitHub's API by running the following command in a command window. Substitute your username and token in the command along with the URL of the repository you are attempting to access.
If you receive a 404 response, your credentials are invalid or you do not have permissions.
curl -H <GitHub username>:<GitHub token> https://api.github.com/repos/o3de/o3de
If you receive a 200 response, your permissions can be found in the returned JSON. - Verify you haven't exceeded your GitHub API rate limits by running the following command in a command window. Substitute your username and token in the command.
If you have no remaining resources, you will need to wait until the time set in the
curl -H <GitHub username>:<GitHub token> https://api.github.com/rate_limit
reset
timestamp field. - Examine the contents of the HTTP headers to troubleshoot the credentials and responses you are sending to the service. In a command window enable additional logging
After enabling this additional logging, try your git operation again and you will be able to see the exact authentication headers you are sending and the responses given. Keep in mind, credentials are usually base64 encoded, so you likely need to decode them. You may also want to pipe the output to a log file for easier searching.
set GIT_TRACE=1 set GIT_CURL_VERBOSE=1
- Verify you are not trying to push directly to the o3de parent repository, this is not allowed. You should only be pushing changes to a fork of the main repository.
- Verify, if you are trying to push to your fork that you have followed the instructions in the
.lfsconfig
file at the root of the repository, specifically, that you are including the name of your fork. - Refer to the troubleshooting steps above for cloning or pushing which cover more authentication troubleshooting steps.
- When a file fails to download with a smudge error, the likely cause is it was never uploaded. First request the original user re-upload all LFS files using the command
If you know the specific Object ID of the file (it's in the error message) you can just upload the single missing file using this command
git lfs push origin --all
git lfs push origin --object-id <object-id>
- After the file(s) have been uploaded, run the following commands to get them from the
origin
remote.If the files still do not appear in the workspace, this can be because the files were only downloaded. Use the following command to refresh the specific files, replacegit lfs pull origin
<branch>
with the name of the branch you are on and replacepath/to/files
with the path to the files you are missing whether that is a single file or multiple filesgit checkout origin/<branch> path/to/files
- GPU Crash Debugging and Reporting
- CPU & GPU Debugging Tools
- CPU Profiling Tools
- GPU Profiling Tools
- GPU Memory Profiling
- Faster Shader Iteration
- Commit sign off
- PerformanceCollector API
- Allocator Tagging Guide
- What happens when entering/exiting Game mode?
- Hello World
- Using Tick Bus
- Using Transform Bus
- Reflecting Properties to the Editor
- Working With An External Lua Debugger
- Attachment Images and Buffers
- Image Builder
- Scene And Render Pipeline
- Shader Management Console (SMC)
- Work With Passes In Gems
- Developer Guide: Shader Build Arguments Customization
- Developer Guide: Customize AZSLc Executable
- Collecting Graphics Performance Metrics
- Mesh Instancing: For Content Creators
- Mesh Instancing: For Shader Authors
- Mesh Instancing: For Engine Maintainers/Contributors
- Screen Capture Image Comparison Testing