Git LFS: Difference between revisions
Hhyyrylainen (talk | contribs) (fixed dev center login page) |
Hhyyrylainen (talk | contribs) (→Write Access: add another paragraph about what to use as a password) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
The LFS repository is configured to not need any login details when reading data. So cloning Thrive and pulling the asset files does not need any login details. | The LFS repository is configured to not need any login details when reading data. So cloning Thrive and pulling the asset files does not need any login details. | ||
For | For <code>git lfs pull</code> to work you must first [https://github.com/Revolutionary-Games/Thrive/blob/master/doc/setup_instructions.md#git-with-lfs install Git LFS]. If the only thing you want to download are the assets, then from that linked page you only need git and git-lfs, you can ignore the other tools if you don't want to compile the game. | ||
== Write Access == | == Write Access == | ||
Line 15: | Line 15: | ||
After logging in click your email under the top navigation. This will take you to https://dev.revolutionarygamesstudio.com/me where there is a button called "Generate Git LFS Token", press it. Then the token is either visible immediately or can be made visible by pressing the button to show the LFS token. | After logging in click your email under the top navigation. This will take you to https://dev.revolutionarygamesstudio.com/me where there is a button called "Generate Git LFS Token", press it. Then the token is either visible immediately or can be made visible by pressing the button to show the LFS token. | ||
Now when you do a | Now when you do a <code>git push</code> after modifying some LFS tracked file (before committing make sure that the big files are listed in the command <code>git lfs ls-files</code>) you will be asked for an username and a password. The username is your development forum email and the password is the LFS token that was created in the previous step. | ||
When asked for a '''password''' use the LFS token you created on the DevCenter. Despite it asking for a password, it needs the LFS token. The password prompt is made by the git client so it is not possible to modify what it asks. | |||
Warning: when using GitHub Desktop (this is a specific git software GUI), it may be unable to ask you for the Git LFS details, causing it to fail. If you run into this problem please switch to another Git GUI or the Git command line tools. | |||
If the git lfs push gets stuck, please recheck that you are using the LFS token and not the API token as well as that you wrote your email correctly. | |||
If you don't get prompted for the username and password again, check the next section. | |||
== Credential Remembering == | |||
Depending on your git setup you may have some git credential remembering component active. You might be able to open a new terminal window or command prompt to get around it. Or it may be possible to kill "git-credentials" process to get it to prompt you again. | |||
If those tips don't help you may have to google for more solutions to reset the remembered passwords. |
Latest revision as of 18:47, 21 January 2024
Git LFS is a tool for making Git repositories work well with big, binary files. Thrive includes a lot of big asset files that are needed to run the game. These are stored with Git LFS to keep our main repo from bloating and slowing things down.
Read Access
The LFS repository is configured to not need any login details when reading data. So cloning Thrive and pulling the asset files does not need any login details.
For git lfs pull
to work you must first install Git LFS. If the only thing you want to download are the assets, then from that linked page you only need git and git-lfs, you can ignore the other tools if you don't want to compile the game.
Write Access
For writing (sending new file) to the Git LFS repo you need to create a token to access LFS in ThriveDevCenter. To do so first login there using your development forum account: https://dev.revolutionarygamesstudio.com/login
After logging in click your email under the top navigation. This will take you to https://dev.revolutionarygamesstudio.com/me where there is a button called "Generate Git LFS Token", press it. Then the token is either visible immediately or can be made visible by pressing the button to show the LFS token.
Now when you do a git push
after modifying some LFS tracked file (before committing make sure that the big files are listed in the command git lfs ls-files
) you will be asked for an username and a password. The username is your development forum email and the password is the LFS token that was created in the previous step.
When asked for a password use the LFS token you created on the DevCenter. Despite it asking for a password, it needs the LFS token. The password prompt is made by the git client so it is not possible to modify what it asks.
Warning: when using GitHub Desktop (this is a specific git software GUI), it may be unable to ask you for the Git LFS details, causing it to fail. If you run into this problem please switch to another Git GUI or the Git command line tools.
If the git lfs push gets stuck, please recheck that you are using the LFS token and not the API token as well as that you wrote your email correctly. If you don't get prompted for the username and password again, check the next section.
Credential Remembering
Depending on your git setup you may have some git credential remembering component active. You might be able to open a new terminal window or command prompt to get around it. Or it may be possible to kill "git-credentials" process to get it to prompt you again.
If those tips don't help you may have to google for more solutions to reset the remembered passwords.