Deployment Error with Streamlit Sharing (fatal: Could not reset index file to revision 'origin/main'.)

I recently built an app with streamlit and while trying to deploy it with streamlit sharing I faced an error. The app loads the first few lines of code quickly but gets struck and loads forever. The last four lines of the log seem to be representing the error:

[manager] Git pull failed: Git pull, cmd: sudo -u appuser  git fetch origin && sudo -u appuser git reset --hard origin/main: error: exit status 128: From
   f71045a..7dcc647  main       -> origin/main
error: unable to create file .streamlit/config.toml: Permission denied
error: unable to create file .streamlit/config.txt: Permission denied
fatal: Could not reset index file to revision 'origin/main'.

This is the GitHub repository: GitHub - Nikhil-Adithyan/BacktestZone: A streamlit app to backtest trading strategies. I couldn’t figure out what is wrong with my code but hoping any could help me out with it.

Have you resolved this issue? Even I’m facing the same problem while trying to create config.toml file in my github repo.

Hi @anveshrithaa, welcome to the Streamlit community!! :wave: :partying_face:

I would suggest you delete the second config.toml file, and re-deploy your app. When I did the same with a fork of your repo, the app used the custom (light) theme defined in IDS-Project/config.toml at main · Anveshrithaa/IDS-Project · GitHub :

Best, :balloon:


Hey @snehankekre,
I tried re-deploying the app and it works perfectly fine now! Thanks a lot!!


Re-deploying is what made it worked! Thank you!

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.