• I have successfully added a website on localhost to bitbucket, i added a bunch of files for the site and i can see the files in the bitbucket repo.
    I have ftp’ed all files incl .git folder to my webserver (except wp_config.php), loaded the db tables etc and the site is up and running.
    Now i want to see if revisr can connect to the bitbucket repo, so i go to revisr settings, help tab and click repository status – a windows opens stating “Error retrieving the status of the repository.”
    At revisor settings, Remote tab the credentials provided under remote URL seem to work fine, a green box stating success! is shown when leaving the field.
    On the revisr dashboard screen, when i hit pull changes, it reports “There was an error pulling from the remote repository. The local repository could be ahead, or there may be an authentication issue. Click here for more details.”
    When i click i see the following “error: bad index file sha1 signature
    fatal: index file corrupt
    error: bad index file sha1 signature
    fatal: index file corrupt”

    Any ideas of what might be wrong?

    Kind regards
    S?ren

    System information as shown on the Help tab:
    Operating System Linux
    Exec() Enabled true
    Git Install Path /usr/bin/git
    Git Version git version 1.7.1
    MySQL Install Path /usr/bin/mysql
    File Permissions true
    Repository Path /var/www/alarmhandler.com/public_html
    Repository Status Click here to view.

    https://www.ads-software.com/plugins/revisr/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Matt Shaw

    (@mattshaw)

    Hi,

    Can you try removing the “.git” directory and re-uploading and seeing if the issue persists? It is possible that the index file was corrupted via FTP. I’ve seen this before when the FTP client changes the encoding of the file, which also changes the SHA1 signature of the file.

    If that doesn’t work, assuming you have a backup of your repo on your local (and it sounds like you do), you could try deleting the “.git/index” file and doing a “git reset” as shown here.

    Let me know if that helps!

    Thread Starter compelling

    (@compelling)

    Hi Matt,
    Indeed after inspecting the file sizes, it seems filezilla had done changes to the files, so transferred the lot agin using binary mode. That fixed the connection to bitbucket.
    But when fetching the status, another error appeared. Some files were reported as untracked on the remote web server when running Revisr-dashboard. Turns out 10 files are added and 10 missing – all of them related to the use of international characters (Danish). So i set out to remove the 10 files on my local machine and the add the 10 files again using only english characters. After doing this, running Revisr-dashboard on the local machine reports 10 untracked files, i hit Commit
    The commit screen appears with all 10 files in the staging list and i hit Commit Changes.
    The screen title then changes to Edit commit and just below it says “10 files were included in this commit. Double-click files marked as “Modified” to view the changes in a diff.” To the right the “commit details” pane says “Status: Error View Details” and clicking them is shows:
    “On branch master
    Your branch is up-to-date with ‘origin/master’.
    Changes not staged for commit:
    deleted: “wp-content/uploads/2015/02/Koben-i-ha314212nd-Mette-1024×681.jpg”
    deleted: “wp-content/uploads/2015/02/Koben-i-ha314212nd-Mette-1024×6811-1024×681.jpg”
    deleted: “wp-content/uploads/2015/02/Koben-i-ha314212nd-Mette-1024×6811-150×150.jpg”
    deleted: “wp-content/uploads/2015/02/Koben-i-ha314212nd-Mette-1024×6811-300×200.jpg”
    deleted: “wp-content/uploads/2015/02/Koben-i-ha314212nd-Mette-1024×6811.jpg”
    deleted: “wp-content/uploads/2015/02/Koben-i-ha314212nd-Mette-150×150.jpg”
    deleted: “wp-content/uploads/2015/02/Koben-i-ha314212nd-Mette-300×200.jpg”
    deleted: “wp-content/uploads/2015/02/Koben-i-ha314212nd-Mette.jpg”
    deleted: “wp-content/uploads/2015/03/A314212rhus-Onsdag-Nord_2015-03-18-artikel.pdf”
    deleted: “wp-content/uploads/2015/03/A314212rhus-Onsdag-Nord_2015-03-18-forside.pdf”

    no changes added to commit”
    So nothing was actually committed. Then I used a terminal and did
    git commit -a -m “my message”
    that fixed it. So there seems to be something wrong when i use the plugin to commit the file deletions.
    Anyway, i have manually removed the internationally characters which solved that problem. So now the two sites are hooked up to bitbucket.

    However, i then tried to do some modification on localhost, then did a status on the remote server. View status shows:

    # On branch master
    # Your branch is behind ‘origin/master’ by 2 commits, and can be fast-forwarded.
    #
    nothing to commit (working directory clean)

    So on revisr-dashboard i hit Pull changes (2) and wait. And wait for 30 mins before giving up. At the top “Processing request” is shown and a spinning wheel is shown in the Quick Actions pane to the right. It seems the process is stuck, so what could be the issue in a situation like that? Almost there!

    Kind regards
    S?ren

    Plugin Author Expanded Fronts

    (@expandedfronts)

    Hi S?ren,

    Can you try a “git pull” manually through terminal and see if that generates any errors?

    Thread Starter compelling

    (@compelling)

    Yes, unfortunately the web host does not provide shell access. Anyway, i have a colleague that will set it up on Friday so we can see if we can make it work across our two macs and see what we learn from that, maybe we discover something we can change on the web server. I will report the result!
    S?ren

    Thread Starter compelling

    (@compelling)

    Hi Matt,
    Our problems on the remote host were due to copying .git directory from a local staging machine that was using a read-write credentials, whereas the web server is using read-only credentials to bitbucket.
    Anyway, we wrote a bootstrap php script to setup the remote host that checks out a local repository and loads all of the revisr database sql files to initiate the db.
    However, the database dump made by revisr seems insufficient (even though all tables were selected under settings-database). After manually dumping the wp_options table and committing it to bitbucket using command line git, the backend now got up and running on the remote server using our script.
    However, as soon as i modify my localhost and commit the database, the wp-options is only partially backed up and is missing a lot of keys that are needed by the remote server to run, eg our Genesis theme by Studiopress uses a key called widget_text that contains all texts on the landing page – all that is lost as soon as i use revisr to commit changes (works if i commit using GIT instead).
    Any suggestions what i should do to make revisr backup absolutely everything in all tables? We seem to be very close at having this up and running now ??
    Kind regards
    S?ren

    Plugin Author Matt Shaw

    (@mattshaw)

    Hi S?ren,

    Are you using MySQL or WordPress as the “Database Driver”?

    Thread Starter compelling

    (@compelling)

    Hi Matt,
    We use MySQL, but when we tried the WordPress driver, we got into troubles with national danish characters. However, i made a clean install on both machines and actually have them up and running, and syncing using bitbucket!

    Only snag is that when i push changes from my local machine, i get 4 keys exported to the remote server that needs patching in the database before the site works
    * site_url=sitename (from https://localhost)
    * home=sitename (from https://localhost)
    * revisr_general_settings (my own git name substituted by a read-only user)
    * revisr_remote_settings (my own git name substituted by a read-only user)

    It would be kind of smart if revisr
    * set site_url and home to localhost if the development url is set, otherwise set them to the development url (revisr setting)
    * did not use the options table for its git credentials. If you had your own table or file, then it could be ignored using the existing ignore table/file feature

    What do you think of the suggestions, or is there a smarter way to get around this?
    S?ren

    Plugin Author Matt Shaw

    (@mattshaw)

    Hi S?ren,

    Thanks for mentioning the issue with the danish characters, I will try to replicate and see if that can be fixed for the next release.

    Can you please clarify this?

    * set site_url and home to localhost if the development url is set, otherwise set them to the development url (revisr setting)

    If the development URL is set to localhost, it should automatically be replacing all instances of “localhost” to the site URL of the site initiating the pull. Is that not working for you?

    Regarding your second point, the next release will stop storing any data in the database (except for the main Revisr activity table on the Revisr dashboard page, which can and should be ignored by not including the wp_revisr table in backups, or by adding to gitignore).

    All options, commits, etc. will instead be pulled directly from Git.

    That release should be ready within the next week.

    Thread Starter compelling

    (@compelling)

    Hi Matt,
    You are right, the substitution should do it for site_url and home. When i use it on the web server, the pull takes ages, so i guess some replacements dont happen (timeout on the server). I will poke a bit more with it to see if i can solve it. Lots of paths geenrated by WP could just be relative and not absolute, so some search and replace could bring down the number of substitutions maybe.
    Great that the other stuff is pulled from Git ??
    Kind regards
    S?ren

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Trying to connect to bitbucket fails’ is closed to new replies.