Git authentication token not working?

I’m trying to add my Git path to CoLab, I used to do it in a similar way to this code:

    %tensorflow_version 2.x
    if not os.path.exists("abc-collective-movement"):

        password = mytokenhere
        #os.environ['git_user'] = user + ':' + password #old method
        !git clone https://$

where I’ve now replaced my old Git password with my new Git token (and I use the correct user1/user2 names), but when I go to import like from folder1 import code1 I get no module named folder as if my path has not been added. How can I make this work? Thanks

Might be worth checking if Git credentials manager is storing the old password somewhere, maybe it’s a case of stored credentials taking precedence over environment variables?