Modding talk:Open source

From Stardew Valley Wiki
Jump to navigation Jump to search
This talk page is for discussing Modding:Open source.
  • Sign and date your posts by typing four tildes (~~~~).
  • Put new text below old text.
  • Be polite.
  • Assume good faith.
  • Don't delete discussions.

Sourcetree

Additional steps are needed for Sourcetree and Github to communicate. Github discontinued the use of password authentication in 2021 and now uses Personal Access Tokens. Before cloning a repo, create personal access token and provide all read-write permissions. Then you have to do a whole mess of stuff in Sourcetree - you are not prompted for Github access info. (At this point I fear if I add more, I'll get blocked again...I tried to add this to margotbean's talk page.)Rogue.toast (talk) 10:20, 14 August 2023 (UTC)

Rogue.toast's post was indeed blocked by new user anti-spam filters. Here is the text of the message, for reference:
I ran into some difficulties while trying to follow the guidance provided on the Modding:Open-source page. I would make the edits myself, but I am confident that I would royally mess it up and not be as clear as needed to ensure others don't hit the same roadblocks I did. Honestly, I had no idea what I was doing, but here's how I finally got Github and Sourcetree to start communicating without throwing fatal errors; I hope it helps to provide insight into making the sub-section "Make Your Mod Open-Source / If Your Code Isn't on Github" clearer.

Steps 1, 2, and 3 were easy to complete without any hiccups. Step 4 is where things went upside-down. Github discontinued using password authentication in 2021 and now uses Personal Access Tokens. Prior to cloning the URL in Sourcetree, new Github users must create a Personal Access Token (Fine-grained, I believe) and set permissions for what access they want Sourcetree to have. They need to make sure they save that token, because they will need to input it in Sourcetree.

Once the token is set up, I then progressed to steps 4 and 5. However, Sourcetree never prompted me to provide my access information. I pressed on with the current instructions on the wiki page, believing I would be asked at some point to provide my token or password, etc. That never happened, so when I tried to commit, Sourcetree produced fatal errors that started a never-ending spiral of "pull first, then push." Sourcetree's help section online offered nothing that would help me resolve this. Several web searches later, I still had no resolution, just more questions. Finally, I just deleted the repo on Sourcetree and started over from scratch.

How I figured this out is beyond my understanding. But there are additional steps that must be taken in Sourcetree before advancing to the step of adding mod files. After cloning the repo:

  1. Navigate to repo settings (gear icon top right)
  2. Click "Remotes" section
  3. Highlight the git path
  4. Click "edit" button
  5. Click on the globe icon to the right of the URL/path
  6. Highlight the project name
  7. Click "edit accounts" button
  8. Double-click on the Github account. An auth window will pop up.
  9. The default auth method is set to OAuth. Change to "Personal Access Token."
  10. Input username and token
  11. If not already selected, make sure Protocol is set to "HTTPS" and Save.

Finally, I was able to commit and publish my mod's code to Github.

I hope that this helps new modders (like me, with zero coding experience or knowledge) navigate these first crucial steps in their journey. Surely an easier way exists, I just don't know it, which is the main reason why I didn't make the wiki edits myself.

Of note, Github also offers a GUI, which might be a lot easier to manage for beginners.

Thanks for all you do, and I hope this is helpful. Rogue.toast (talk) 05:37, 14 August 2023

Thank you to Rogue.toast! I will add the steps to the page as written. margotbean (talk) 15:39, 14 August 2023 (UTC)
tbh Visual Studios github integration is now pretty competent, and MS documents it pretty well. Atravita (talk)
Thanks for the link, Atra! Rogue.toast mentioned that they did several web searches, but didn't find any help. I can relate to that problem all too well.
I'm sure no one would mind if you replaced the steps I added with a link to the VS page, if you think that would be better. margotbean (talk) 16:13, 14 August 2023 (UTC)
Thank you, margotbean and Atra! If there is an easier option for beginners than Sourcetree, then I think that should definitely be placed front and center! Like I'd said, I'm very new to all this. I even have VS and didn't use it because a) I didn't know I could; and b) I followed the Wiki :) Rogue.toast (talk) 01:50, 15 August 2023 (UTC)