How to add git push opts to datalad publish command?

Hi datalads,

Another datalad question. Currently there is no good way to add google cloud as a special remote to git annex. If you want to use this service, you must utilize their CLI (gsutil/gcloud).

I wrote a wrapper for their CLI that allows a user to specify a remote bucket/project; i.e)

git push -o GCS_BUCKET=‘gs://BUCKETNAME’ origin master

Where the origin is a central bare repository with hooks for synchronizing to google cloud buckets.

Is there any way to pass this option to datalad publish? I noticed it only takes git-annex opts, which do not support push opts (as far as I am aware of in my limited understanding).

More info on hooks here:

1 Like doesn’t cover it?

as for the option, manpage for git push says

           --push-option=<option> is given from the command line, the values
           of configuration variable push.pushOption are used instead.

so I guess you could just define them in the .git/config?

Thank you Yarick,

I haven’t tried DanielDent’s solution yet but I’m afraid I’ll get the same authentication issues I ran into with and other solutions suggested on

As for a temporary solution - I just added GCS_BUCKET in my .bash_profile. Didn’t think to add it to the git config. Thanks!!

1 Like