Publii GitLab Sync error
- This topic has 18 replies, 4 voices, and was last updated 8 months, 4 weeks ago by .
-
AuthorPosts
-
August 21, 2022 at 5:53 pm #8099
h.intveen
I am using Publii 040.2 on Mac OS 12.5.1 and had no problems with my GitLab site over the last year until recently.
Syncing my website to Gitlab now gives the error: “An error occurred while connecting to the server: Response code 400 (Bad Request)”.
Help is greatly appreciated!The file deployment-process.log contains the following:
[Sun, 21 Aug 2022 16:43:58 GMT] (!) TEXT FILES TO UPLOAD DETECTED
[Sun, 21 Aug 2022 16:44:03 GMT] (!) COMMIT ERROR: {“name”:”HTTPError”,”timings”:{“start”:1661100238121,”socket”:1661100238130,”lookup”:1661100238130,”connect”:1661100238144,”secureConnect”:1661100238172,”upload”:1661100240689,”response”:1661100243685,”end”:1661100243685,”phases”:{“wait”:9,”dns”:0,”tcp”:14,”tls”:28,”request”:2517,”firstByte”:2996,”download”:0,”total”:5564}},”description”:”A file with this name already exists”}August 27, 2022 at 2:08 am #8132bobsteva
I too have received this exact same error. however, I’m on Linux, specifically Linux lite, an Ubuntu variant. If i have to roll back an update fine but, why is this happening in the first place? It worked perfectly fine before. So if anyone else can help us that would be amazing
September 2, 2022 at 5:51 pm #8182Tomasz Dziuda
Hi, can you share your website backup in a private reply?
--
Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!September 3, 2022 at 9:50 am #8194h.intveen
This reply has been marked as private.September 3, 2022 at 12:07 pm #8195Tomasz Dziuda
This reply has been marked as private.September 3, 2022 at 12:16 pm #8197h.intveen
This reply has been marked as private.September 3, 2022 at 12:17 pm #8199iceberg53
Hi!
I’m having the same issue on Windows 10 and Publii version 0.40.
Thanks for your help.
September 3, 2022 at 12:30 pm #8200Tomasz Dziuda
This reply has been marked as private.September 3, 2022 at 5:34 pm #8201Tomasz Dziuda
Ok, I have found a reason of the problem – the issue occurs when binary files needs to be uploaded to the Github.
We will release a hot fix v.0.40.3 in the next week to solve this issue. I will let you know when it will be ready to download.
--
Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!September 4, 2022 at 12:38 am #8204iceberg53
I just noticed that the message in the deployment-process.log is actually different for me. Instead of โA file with this name already existsโ as noted above, I get “A file with this name doesn’t exist”.
The whole file’s content is as follows :
[Sat, 03 Sep 2022 23:25:14 GMT] (!) CLIENT CREATED Founded 864 operations to do [Sat, 03 Sep 2022 23:25:36 GMT] (!) FILES TO REMOVE DETECTED [Sat, 03 Sep 2022 23:25:36 GMT] (!) REMOTE FILE DOWNLOADED [Sat, 03 Sep 2022 23:25:37 GMT] (!) COMMIT ERROR: {"name":"HTTPError","timings":{"start":1662247536049,"socket":1662247536050,"lookup":1662247536050,"connect":1662247536173,"secureConnect":1662247536400,"upload":1662247536402,"response":1662247537342,"end":1662247537343,"phases":{"wait":1,"dns":0,"tcp":123,"tls":227,"request":2,"firstByte":940,"download":1,"total":1294}},"description":"A file with this name doesn't exist"}
I added the screenshot of the error message as an attachment.
September 4, 2022 at 12:42 am #8206iceberg53
Furthermore, I’m not aware of any binary file in my website’s content. I don’t know if there’s an explanation for it.
September 4, 2022 at 10:35 am #8212Tomasz Dziuda
@iceberg53 – your issue also can come from the same bug. BTW images are also binary files ๐
--
Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!September 4, 2022 at 11:54 am #8217iceberg53
Okay.
I’ll then wait for the hot fix.
Thanks for your support.
September 5, 2022 at 12:41 pm #8222Tomasz Dziuda
Hi,
The hotfix has been released (v.0.40.3) – I strongly suggest to make a backup of the files on the repository.
Then you can try to remove public catalog and publii.files.json file and do full resync (I suppose that due fact that repository is probably out of the sync, without removing files it will be impossible out of the box).
If somethings goes wrong during resync – you will be able to restore previous state of public catalog and publii.files.json file using files from the backup.
--
Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!September 5, 2022 at 5:17 pm #8240h.intveen
Now my website synced OK, thank you very much for the hotfix!
September 6, 2022 at 11:42 am #8262iceberg53
Thanks for the hot fix.
I’m ,however, still not able to sync my website and I keep getting the same error message I shared above.
Testing the connection with the server yielded a result I’ve a hard time understanding.
The error message states that Publii was able to connect to the server but unable to store files as the repository didn’t exist.
I don’t understand why as my repository does exist even though I deleted the public folder and the publii.files.json file.
The access token I used has no expiration date but I preferred creating a new one to make sure that it had nothing to do with it.
So far, nothing seems to work.
Any hint about solving this problem is very welcome.
Thanks in advance.
September 6, 2022 at 12:47 pm #8267Tomasz Dziuda
Possible reasons:
1) you have a typo in the repository name,
2) given user has no access to the necessary repository
3) your API key has no access to read/write repository data--
Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!September 6, 2022 at 6:46 pm #8294iceberg53
Considering your suggestions, I tried to figure out what wasn’t working properly. I checked my repository name for a typo, I’m the owner of the repository and my access token has an api scope.
I googled a bit and found that such an error might be related to my ssh keys. I then generated new ssh keys and added them to my Gitlab account, but it still didn’t work.
Afterwards, I created a new repository with a gitlab-ci.yml and tried deploying. It worked flawlessly.
I tried many other scenarios with my existing repo and the new one to figure out the problem.
Ultimately, I concluded that as long as my target repo name is exactly the same as my username, I would keep getting the same error.
I just had to rename my repository to be able to deploy.
Thanks for your support and for developing Publii. I really like it.
September 6, 2022 at 7:23 pm #8295Tomasz Dziuda
Thanks for your feedback – I will check why repository name the same as user name can lead to the issues, and I will try to fix it in v.0.41 if possible ๐
--
Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better! -
AuthorPosts
- You must be logged in to reply to this topic.