gin
command not foundYour terminal emulator complains that gin
command is not found.
But you can see your gin
program on your PC.
In short: it is very likely that the PATH
environment variable is not set (properly) for your Gin-CLI.
The terminal emulator looks for commands by visiting the directories listed in its settings. The settings for the terminal emulator is called the "environment variables", and the variable for the list of the command-lookup directories is called PATH
.
In many cases, you have to manually add to PATH
the directory where the command is located.
set-global.bat
to do it for you. Just double-click this file.Even when you use set-global.bat
, sometimes the directory is not added properly because there are already lots of directories listed in PATH
and it cannot add any more due to the character-number limitation(!). It can occur when you have already installed lots of programs on your computer.
In such cases, the possibilities are:
PATH
one by one, and try to reduce the number of characters in it:
defining the PATH
environment variable is much like defining the HTTP_PROXY
variable on this section, so please refer to it.gin-shell.bat
as an alternative terminal emulator.gin commit
or gin upload
to add/commit changes.Ctrl + C
, but you end up failing to add changes.Although this situation has not been fully resolved, there are two factors that may be involved: large file-sizes, and a large number of files.
gin
takes time (increases linearly with the file size). Probably you see in the Process Manager that Gin-CLI consumes some CPU power until it is done. Please wait for some time (up to several minutes).gin
has some issues when adding too many changes all at once.Below are some tips to avoid the situation:
gin annex add <files or directories>
gin git add --update
gin git commit
(optionally appended by a custom message: -m "<message>"
)gin upload
(note: without a dot .
at the end).gitattributes
file.
IMPORTANT: if you want gin
to take this settings into account, you must use gin annex add
(instead of gin commit
).
.gitattributes
(without any extension e.g. ".txt").* annex.largefiles=largerthan=100kb
will add all files into annex if they have more than 100 kilobytes in size.*.mat annex.largefiles=anything
will add all files into annex if they have the ".mat" extension.*.ipynb annex.largefiles=nothing
will add the ".ipynb" file normally (i.e. without being annexed) no matter the file size.#
.The example file is as below (you can copy and paste it if you like):
# general settings
* annex.largefiles=largerthan=100kb
LICENSE annex.largefiles=nothing
# data files
*.dat annex.largefiles=anything
*.mat annex.largefiles=anything
*.ibw annex.largefiles=anything
*.ifn annex.largefiles=anything
*.npy annex.largefiles=anything
*.npz annex.largefiles=anything
*.tif annex.largefiles=anything
*.tiff annex.largefiles=anything
*.png annex.largefiles=anything # it depends, but safer this way
*.jpg annex.largefiles=anything # it depends, but safer this way
*.jpeg annex.largefiles=anything # it depends, but safer this way
*.bmp annex.largefiles=anything
*.avi annex.largefiles=anything
*.mp4 annex.largefiles=anything
*.json annex.largefiles=anything # it depends, but safer this way
*.csv annex.largefiles=anything # it depends, but safer this way
*.tsv annex.largefiles=anything # it depends, but safer this way
*.xml annex.largefiles=anything # it depends, but safer this way
# binary document files
*.pdf annex.largefiles=anything
*.docx annex.largefiles=anything
*.pptx annex.largefiles=anything
*.xlsx annex.largefiles=anything
# code and text files
*.md annex.largefiles=nothing
*.txt annex.largefiles=nothing
*.yml annex.largefiles=nothing
*.yaml annex.largefiles=nothing
*.m annex.largefiles=nothing
*.r annex.largefiles=nothing
*.py annex.largefiles=nothing
*.ipynb annex.largefiles=nothing
*.htm annex.largefiles=nothing
*.html annex.largefiles=nothing
Uploading involves a lot of uncertainties, but gin
may only say upload failed
(if it says upload OK
, then please refer to another section).
Please check the points below, one by one:
gin git remote set-url origin <URL>
The <URL>
must be in the form: ssh://git@gin.g-node.org:22/<organization>/<repository-name>
. Make sure that you do not have .git
after the repository name!larkumlab-data-micro.charite.de
, then it is the problem with the SSH proxy server. Ask someone for restarting the proxy service.If the problem does not fall into one of the points above, please contact someone who knows more.
gin upload
, and it says uploading OK
.gin upload
.Below are the points to our current interpretation:
gin
has experienced a problem (likely with SSH) some time before, when it tries to upload contents of large data files.gin
erranously considered "this server is not compatible with uploading large data files".gin
does not attempt to upload file contents anymore.In short: gin
(or git annex) uses the git config remote.origin.annex-ignore
to remember whether the server has the annex backend. All you have to do is to unset this config.
In reality, it requires a bit of complexity to solve the problem:
gin git config --list
. It shows all the repository-specific Git configuration.
(listed in the alphabetical order)remote.origin.annex-ignore=
Make sure that is says true
(Otherwise it must be due to some other reasons).gin git config --unset remote.origin.annex-ignore
It should return without any output.gin git config --list
to make sure that the property is gone.