Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Git connection to GitHub doesn’t work after token update

  • #11286
    Avatar photo[anonymous]

    Hello, Alx, again.

    Today I needed to update the GitHub token, and Publii looks as if sync (though when testing connection it still gets stuck), but nothing happens in GitHub.

    The deployment.error log is empty.

    It however works if I duplicate the site and reconnect the git connection with the new token.

    #11291
    Avatar photo[anonymous]

    Hi,

    Do you have anything useful in deployment.process log file?

    #11304
    Avatar photo[anonymous]

    It doesn’t look like.

    This is the last lines of the deployment.process log in the original (actually this was already a copy if the very first one) website that doesn’t work:

     Git debug: git add done
     Git debug: changes exists =  true
     Git debug: commit done
     Git debug - message: 
     Git debug: push done

    And this are the last lines of the deployment.process log in the copied website that connects to GitHub:

     Git debug: git add done
     Git debug: changes exists =  true
     Git debug: commit done
     Git debug - message: 
     Git debug: push done

    The previous lines are all the files and pages, all marked as ‘add’

    #11342
    Avatar photo[anonymous]

    @Alx – I have found one issue – did you changed your repository URL under Server settings after first sync? I have found that after initial sync changing repository URL has no effect. So e.g. if you used URL1, synced website, then changed repository URL to URL2, Publii will still try to sync website under URL1.

    Website duplication can help, because some folders (including .git in the output directory)  are removed so then the app starts to use URL2.

    I will implement a fix which will remove .git repository after server settings change

    #11347
    Avatar photo[anonymous]

    Hello Tomasz,

    Thank you for your reply.

    I didn’t change the URL initially, just the token.

    #11350
    Avatar photo[anonymous]

    Please try to remove the output directory from your site directory and then please create empty output directory. Then please try to sync your website again

    #11372
    Avatar photo[anonymous]

    Hello Tomasz,

    I’ll keep this in mind for the next token update.

    Thank you very much for all the support!