Closed beckyjackson closed 3 years ago
I find that staging confuses people, so we tried to skip that step. Do you have a use case we need it for?
When I was testing ONTIE, running Commit didn’t add anything. So I’m unable to add/commit anything unless I ssh into the server and do it that way.
On Tue, Jul 13, 2021 at 12:16 PM James A. Overton @.***> wrote:
I find that staging confuses people, so we tried to skip that step. Do you have a use case we need it for?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ontodev/droid/issues/107#issuecomment-879336282, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7ZMRX6PXFLZGIMIIFCVUDTXSGIDANCNFSM5AJZFNXA .
Were you trying to add a tracked or an untracked file? Also, what did the console say?
Yeah, it’s set up to only commit changes to tracked files. I was thinking that if you want to git add
to start tracking a file you could use a CGI script. I don’t want non-technical users to add files they shouldn’t. But if I missed an important use case then we can change things.
These are tracked files, sorry. I don't know why, earlier I wasn't getting an error message so I assumed it just wasn't adding. After logging out and in again, I'm seeing an error message now. Clicking Commit results in this:
$ git commit --all -m "test" --author "Becky Jackson <>"
Committer identity unknown
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'root@b6fdc061329b.(none)')
So the --all
flag handles the tracked files, but this is a separate issue.
Yes that is normal (in the sense that it is expected, though if we want this behaviour changed we could probably do something).
DROID sets up docker containers blindly (i.e., it just does whatever you specify in the Dockerfile but no more) and doesn't assume that they've been configured correctly.
Hmm. The user (i.e. Becky) is logged in to GitHub so we should know the email address. It looks like we know the username “Becky Jackson”, so why is the email address missing?
It is because we need to run commands like the following prior to running a command like git commit
:
docker exec lmcmicu-for-testing-with-droid-master git config --global user.name "Test User"
docker exec lmcmicu-for-testing-with-droid-master git config --global user.email testuser@localhost
DROID currently doesn't assume that this has been done, but sure, we can add steps like this to the container initialisation stage.
By the way, @beckyjackson , as a workaround for now you should run the above commands, replacing:
lmcmicu-for-testing-with-droid-master
with the container name, which should be: <username>-<project-name>-<branch-name>
if it was created by DROID.~@jamesaoverton I believe we need to have both a name and an email address, but I'm not sure if DROID has the name info. I think it might be available in the info DROID receives about the user from GitHub, but I will need to check to be sure. In case it is not available is it alright to fall back to the username?~
I don't mind doing this workaround for now, but I'm trying to get someone else up to speed with DROID who won't have access to the server, so it would be great if this could be set up automatically!
I've put this at the top of my TODO list.
~I can't remember if clicking the "Commit" button under version control used to stage all changes, but there is currently no way to "add" changes to staging via DROID. @lmcmicu - am I missing something, or is this a bug?~
[Edit] - Clicking "Commit" results in the following error: