sqlitebrowser / dbhub.io

A "Cloud" for SQLite databases. Collaborative development for your data. 😊
https://dbhub.io
GNU Affero General Public License v3.0
375 stars 40 forks source link

Cannot share database #175

Open dallyn86 opened 1 year ago

dallyn86 commented 1 year ago

I have uploaded a database and I tried to add contributors to my database. I added them and saved it but they cannot see the database. Can y'all help?

justinclift commented 1 year ago

Looking now. :smile:

justinclift commented 1 year ago

What's your account name? :smile:

justinclift commented 1 year ago

Hmmm, one potential workaround (for now) if this takes a while to solve, is you can generate your own client certificate + give that to your contributors. That'll let them remotely log in as you (!), which will mean they can access/write/update the database themselves.

Obviously not a fantastic long term solution, but "it works" is sometimes good enough. :wink:

dallyn86 commented 1 year ago

My username is dallyn86

pedro-lp commented 1 year ago

Hmmm, one potential workaround (for now) if this takes a while to solve, is you can generate your own client certificate + give that to your contributors. That'll let them remotely log in as you (!), which will mean they can access/write/update the database themselves.

Obviously not a fantastic long term solution, but "it works" is sometimes good enough. 😉

Hello, I would like you to help me create my database, and be able to integrate it into my sqlite browser application, or if you can send me the documentation link to be able to integrate it, sometimes I use more than one device and I would like to be able to edit my project from my laptop and also from my desktop computer.

justinclift commented 1 year ago

Oh, this issue somehow got missed. :frowning:

@dallyn86 If you're still interested in getting sharing working, then it might be a lot easier now. We updated the web interface a few weeks ago, so shared databases are displayed directly on a person's profile page when they log in. And it should in theory be easier to get sharing working too.

@pedro-lp Can you tell us a bit more about your "SQLite Browser application"? :smile:

Are you meaning you have this application (https://sqlitebrowser.org) running on both your laptop and desktop, and you want to share a (SQLite) database between them both?

If that is what you're meaning, then we can probably help with that. :smile:

pedro-lp commented 1 year ago

Yes, that's what I mean, how can I edit my database from 2 different devices with the DB Browser for SQLite app? https://sqlitebrowser.org/ if there is any tutorial to do it or documentation, I would appreciate it. 😄

justinclift commented 1 year ago

if there is any tutorial to do it or documentation

I wish there was. Actually, maybe @chrisjlocke would be interested in whipping up a wiki page with some screenshots or similar?

That being said, try this (created just now). :smile:

The steps to follow

1. Create an account on DBHub.io, and log into it

2. Generate a client certificate

It's the blue Generate client certificate button underneath the Your page heading:

image

That will give you a "certificate" file to save on your local computer. That file is your ID for DBHub.io, used in the next step. :smile:

3. Load the certificate in DB Browser for SQLite

a) Start DB Browser for SQLite image

b) Open the Preferences dialog image

c) Switch to the Remote tab in the Preferences dialog image

In my screenshot above, it shows a "justinclift@d..." entry. Yours will probably be blank instead, as you haven't added a certificate yet.

d) Click the Import certificate file button

It's the top icon on the right side, with a green + sign in the corner of the icon. (kind of hard to describe it)

That should open a file browser. Locate that certificate file you downloaded above, and tell it to open that.

The certificate details should then be displayed in the Your certificates part of the Remote tab, like mine was.

e) Click the "Save" button at the bottom of the Preferences dialog to close it.

At this point, you now have things set up to access DBHub.io. :smile:

4. Use the Remote tab in DB Browser for SQLite

If it's not displayed yet, then turn on the Remote tab. View -> Remote from the top menu.

image

Notice the Select an identity to connect drop down? Click that, and it should show the certificate you just loaded, and also an entry for Public.

If you click on the entry for the certificate you just loaded, it will connect to DBHub.io and show your databases on there. It'll be a blank list, as you've just started out.

When you've gotten this done I'm pretty sure you'll figure the rest out.

Anyway, try things out and see how you go. :smile:

chrisjlocke commented 1 year ago

I'll create a tutorial video - always handy to link to.

justinclift commented 1 year ago

@chrisjlocke Good thinking. :smile:

chrisjlocke commented 1 year ago

I know. I surprise myself sometimes. ;)

pedro-lp commented 1 year ago

¿Ves el menú Select an identity to connectdesplegable? Haga clic en eso y debería mostrar el certificado que acaba de cargar, y también una entrada para Public.

Si hace clic en la entrada del certificado que acaba de cargar, se conectará a DBHub.io y mostrará sus bases de datos allí. Será una lista en blanco, ya que acabas de empezar.

I followed the steps, but it shows me this message, I don't know if I did something wrong, I downloaded the certificate from the blue button and I only have a private remote database. "Error opening remote file at https://db4s.dbhub.io/. The root of the CA certificate is not trusted for this purpose"

image
justinclift commented 1 year ago

Ugh. That's right, I totally forgot about that.

That's a known issue on macOS (caused by Apple), which has stopped certificates from working there. :frowning:

https://github.com/sqlitebrowser/sqlitebrowser/issues/2829

We haven't yet found a solution to that problem, although we have some ideas. It's not going to be fixed in the next few days.


That being said, your next option is to just use the DBHub.io web interface instead. eg upload to your account via the website, and download on both your laptop and desktop using the website too. And open or edit the files in DB Browser for SQLite afterwards.

It's the same process, just using a web browser for the file transfer instead.

pedro-lp commented 1 year ago

Thank you, I tried it with my laptop, it has windows and it worked correctly, regarding Mac os, yes, it's a problem with the keychain, that's why it doesn't allow to connect correctly