Common issues and solutions for the cleaned git-drs CLI.
Navigation: Getting Started -> Commands Reference -> Troubleshooting
No.
git drs init is repository setup. In most cases you do not need to run it manually at all, because git drs remote add ... now bootstraps that setup automatically when it is missing.
Run it when:
- you want to initialize repo-local
git-drsstate before adding any remote - you want to repair hooks/config wiring explicitly
Do not run it every session:
- not at the start of normal daily work
- not after refreshing credentials
- not after
git pull
What it changes:
- creates
.git/drs/repository-local state - sets up
git-drsrepository configuration and hooks - prepares the repo for managed pointer/register/hydration behavior
Usually nothing catastrophic, but it is unnecessary.
If you did it accidentally:
-
inspect what changed
git status git diff
-
if the changes are harmless, leave them alone or commit what you intended
-
if you want to discard the uncommitted changes, use normal Git restore/reset flow carefully
-
if hooks or repo-local state were repaired intentionally, keep the changes
The right default is: inspect first, then decide whether anything actually needs to be reverted.
It prepares repository-local git-drs state:
.git/drs/metadata/state- hook/config wiring for
git-drsworkflows - the repo-local setup needed for pointer/register/hydration behavior
Those changes persist in the clone. They are not something you redo per session.
- repository-local
git-drssetup - remote configuration
- tracking rules
- object hydration
- DRS/Syfon metadata-oriented workflows
Examples:
git drs remote add [name] <endpoint-or-alias> ...git drs remote remove ...git drs initgit drs trackgit drs ls-filesgit drs pullgit drs add-urlgit drs copy-records
- branch and commit movement
- staging and committing
- ordinary ref push/pull operations
Examples:
git addgit commitgit pushgit pull
Before debugging behavior, keep the command split straight:
git pull- updates commits, branches, and checkout state
git drs pull- hydrates tracked pointer files already present in the current checkout
git drs ls-files --all- shows tracked pointers and localization state
If you blur those together, the failure modes get confusing.
Check these in order:
-
confirm the file pattern was tracked before the add/commit flow
git drs track
-
confirm
.gitattributeswas staged after changing tracking rulesgit status
-
confirm the file shows up in the tracked inventory
git drs ls-files --all
-
inspect
.git/drs/logs if the hook path failed
Check:
git drs remote list
git drs ls-files --drsThen retry with higher Git/HTTP verbosity if needed:
GIT_TRACE=1 GIT_CURL_VERBOSE=1 git drs pushThat usually just means hydration has not happened yet.
Run:
git drs remote list
git drs pullIf the repo has never had a git-drs remote configured, run git drs remote add ... first. That command will also install the repo-local hooks/config.
If you use SSH remotes, keepalives help:
Host github.com
TCPKeepAlive yes
ServerAliveInterval 30
For globus:// access URLs, first verify Globus Transfer API authentication:
git drs auth globus statusThen check the destination collection:
echo "$GIT_DRS_GLOBUS_DESTINATION_COLLECTION"By default the destination collection root must expose the Git repository so
/.git/lfs/objects/... addresses its local cache. For an institutional
collection, configure the repository path:
git config --local --add \
drs.remote.<remote-name>.globus-destination-path \
'<destination-collection-id>=/projects/repository>'The stored credential must include
the Globus Transfer API all scope and any collection-specific data_access
dependent scopes. Rerun git drs auth globus login --scope <scope> when Globus
reports missing consent. If the DRS object offers multiple access methods,
prefer Globus selection while debugging:
GIT_DRS_ACCESS_METHOD=prefer:globus git drs pullIf HTTPS fallback hides the Globus readiness error, require Globus for that pull:
git drs pull --access-method globusSelection diagnostics classify a candidate as disabled when it is
unavailable or not configured, and broken when configuration is invalid or a
credential is expired without refresh. DRS /access resolution is planning;
fallback ends when the first byte request or Globus task submission starts.
See Globus Access Methods for setup and troubleshooting details.
git-drs does not treat repository content as permission to send credentials.
Review .git-drs/drs-policies.yaml, then trust the exact canonical endpoint in
this clone:
git config --local --add drs.trusted-endpoint https://drs.example.orgAlternatively, configure a clone-local endpoint override. Never place tokens, credential profiles, Globus destinations, or destination paths in the shared YAML file.
That is expected.
git drs pull no longer runs git pull.
Use:
git pull
git drs pullThis is not expected for a pointer created by a current git drs add-ref:
add-ref automatically adds its destination to .gitattributes. For pointers
created with an older version, add the tracking rule with
git drs track path/to/file and stage .gitattributes.
Check these in order:
- is the path actually tracked?
git drs track- did you stage
.gitattributesafter adding the pattern?
git add .gitattributes- is the file part of the current checkout?
git ls-files -- path/to/file- inspect the local view:
git drs ls-files --longgit add and git drs add-ref are separate commands. If they are entered on
the same command line, Git interprets --remote as an option to git add,
which does not have that option.
Create the reference first, then stage the generated pointer and tracking rule:
git drs add-ref --remote anvil drs://drs.anv0:v2_example subject.tsv
git add .gitattributes subject.tsv
git commit -m "Add subject.tsv reference"Do not prefix the git drs add-ref command with git add.
That is expected.
Git remotes and git-drs remotes live in different config domains.
Use:
git drs remote list
git drs remote remove <name>or:
git drs remote rm <name>That usually means one of these:
- the current checkout already has localized bytes
- there are no tracked pointer files matching your include filters
- the file is not tracked by
git-drs
Check:
git drs ls-files --all
git drs ls-files -I "*.bam"
git drs pull --dry-run -I "*.bam"Check DRS registration status:
git drs ls-files --drsIf the object is not registered or not resolvable from the configured remote, hydration cannot succeed.
Also confirm the remote configuration:
git drs remote listIf needed, inspect the detailed logs:
ls -la .git/drs/Current shape:
git drs remote add [remote-name] calypr --scope <organization/project> \
--credential <source>Credential sources use an explicit scheme such as file:/path/to/key.json,
env:GEN3_TOKEN, or profile:production; inline secrets are not accepted.
If this fails, the likely cause is missing bucket mapping for that scope.
That mapping is usually steward/admin setup, not something the end user invents ad hoc.
Refresh by re-adding the remote with a new credential file or token:
git drs remote add production calypr --scope HTAN_INT/BForePC \
--credential file:/path/to/new-credentials.jsonYou do not need to run git drs init again.
What git-drs does automatically:
- if the stored access token is expired but the stored API key is still valid,
git-drswill attempt to refresh the access token - if the API key itself is expired, revoked, or replaced, re-run the unified
git drs remote add ... --credential <source>command
How to think about recovery:
- token expired, key still valid:
- often automatic
- key expired or replaced:
- rerun
git drs remote add ... --credential file:<path>or use an environment credential source such as--credential env:GEN3_TOKEN
- rerun
How to check what is in use:
git drs remote listAnd for the underlying Gen3 profile data:
- inspect
~/.gen3/gen3_client_config.ini
If you want the least surprising fix, re-run the unified git drs remote add
command with the current --credential file:<path>. That updates the stored
profile and repo token plumbing in one step.
Check:
git drs remote list
git drs ls-files --drsTypical root causes:
- expired credentials
- wrong remote selected
- missing server-side bucket mapping
- object registration or upload permissions missing for the target scope
If the failure happened during managed data push behavior, make sure you actually ran:
git drs pushPlain git push does not run git-drs registration/upload behavior.
Symptoms:
- large files were committed directly to Git
git drs ls-filesdoes not show the file
Recovery:
git drs track "*.bam"
git add .gitattributes
git rm --cached large-file.bam
git add large-file.bam
git commit -m "Track large file with git-drs"That is normal.
After cloning:
git drs pullOr hydrate only what you need:
git drs pull -I "*.bam"git checkout is fully safe by default. Git DRS automatically skips downloading file payloads during checkout/clone (to keep checkouts fast). Only the lightweight pointer files are written to the working tree initially.
-
Hydrate file content explicitly (Standard Workflow): When you need the actual content of the files, run:
git drs pull
Or hydrate only what you need:
git drs pull -I "*.bam" -
Force download during checkout (Optional): If you want Git DRS to always download and hydrate all file payloads automatically during checkouts (reverting to non-skip behavior), you can:
- Configure it during remote setup:
git drs remote add public calypr --scope HTAN_INT/BForePC \ --credential file:~/.gen3/credentials.json --checkout hydrate - Or configure it directly in Git settings:
git config drs.skipsmudge false - Or run individual commands with the environment variable:
export GIT_LFS_SKIP_SMUDGE=false
- Configure it during remote setup:
When behavior is unclear, use this sequence:
git drs remote list
git drs track
git drs ls-files --long
git drs ls-files --drs
git drs pull --dry-runThat usually tells you whether the problem is:
- tracking
- hydration state
- DRS registration
- remote configuration
Useful checks:
git drs remote list
git drs track
git drs ls-files --long
git drs ls-files --drs
ls -la .git/drs/If you see old notes mentioning these, ignore them:
git drs fetchgit drs listgit drs uploadgit drs download
Those were removed from the cleaned CLI surface.