change login timeout period for using scm in command line.
One answer
There is no timeout for the credentials of the CLI. (And subsequently, there is no way to modify it).
Perhaps you can see if your script is always failing consistently in the same "spot".
- Maybe it's always failing on the same command in your script (maybe sprinkle some sleeps in it to determine that it always fails at the same execution line and not the same time).
- Or Maybe record your scripts time-to-failure to see if it's always the fails in the same amount of time and try to see if it's a timeout/failure of something else that does have a lifespan.