woriking with git hub

Hello!

I've published my project with RubyMine in  github. A repository with files was created, let say REPO. But I have some questions on working with github.

1) On another machine with RubyMine i've made a check out of REPO, it createad and emty dir REPO, but had not downloaded any content there. So the questing what are the steps to work with github (RubyMine) on two machines?

2) I've remove from .gitigrore line "db/*.sqlite3" and I expected the sqllite3 files to be added to github repository after I commit changes. But they weren't, where am I wrong?

Thanks.

0
4 comments

Hi Alex,

First: did you 'push' your content to github after committing it on your local archive? Git keeps a full local archive and doesn't actually publish the full content to the remote until you do a push. Check with the github web interface that your content is actually present on their server.

Click on menu 'Version Control | Git | Push Changes...' will allow you to push all changes to the remote server of your choice - like github for example.


Second: after removing 'db/*.sqlite3' from the .gitignore file, did you 'add' the sqlite database files to to git archive - just a commit will not add 'new' files unless you tell it to do so...

Click on menu 'Version Control | Show Changes View' to get the Changes pane open, make sure that 'Local' is selected on the top bar of the Changes pane and (if it's a new project) you'll see a couple of different tree branches 'Default' and 'Unversioned filed'. If you expand the unversioned files you should see you sqlite database files there if you right-click on them to get the pop-up menu you'll find 'Add to VCS'. Do that for each and then commit to get the files into your git archive.

Note that every time you run your app you are likely to change your database files and so they are likely to be recorded as having changed each and every time so this is not a particularly good way to store an initialisation for a database, pardon me if I'm teaching the gentle art of sucking eggs, but using the db/seeds.rb file is a more natural place to store database initialisations.

Hope that helps,
Geoff

0
Avatar
Permanently deleted user

Well, thank you for your answer, Geoff,


On Windows it works fine. But on my mac there is an error.

When I try to run push or pull (or fetch) commands from RubyMine i've got:
"fatal: The remote end hung up unexpectedly"

the Version control console writes

SSH: authentication methods: [publickey, keyboard-interactive, password] last successful method:
java.io.IOException: Authentication failed:
 at org.jetbrains.git4idea.ssh.SSHMain.authenticate(SSHMain.java:280)
 at org.jetbrains.git4idea.ssh.SSHMain.start(SSHMain.java:155)
 at org.jetbrains.git4idea.ssh.SSHMain.main(SSHMain.java:135)
fatal: The remote end hung up unexpectedly


i'm using RubyMine 3.2 EAP (107.315)

If I test my GitHub settings in RubyMine it says Connection successful
Git from terminal works fine.

0

"The remote end hung up unexpectedly" is one of SSHs cover everything error messages; but it usually points to an access error - most frequently when I've had it with git it's because I've typed the remote pathname incorrectly.

Although the error message is suggesting that it's lost your keyfile to use in the link once the real connection is underway, that could be misleading: the connection test purely attempts to open a connection and then closes it again, if it succeeds then it states that all is well; the real connection it opens the connection and starts to issue commands on the remote system, if those commands, for example 'cd /' fail then you get an error like the above as the link tends to be unceremoniously dropped.

So things to check: that the keyfile is a keyfile of a user with write privileges (if, like me, you have multiple keyfiles, it's all to easy to mix them up); that the remote path and resource name are correct (caase sensitive: 'Elephant' is not the same as 'elephant'); and that your local path is writable (more often a problem for Windows bods who get clogged up is the resourse management structures of Visa+).

Hope something there gives you an idea to persue.

Geoff

0
Avatar
Permanently deleted user

Thank you for your response, there was a problem with my RSA key indeed.

0

Please sign in to leave a comment.