You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Git推送报错:remote rejected无法迁移对象至永久存储,求排查方法

Troubleshooting "unable to migrate objects to permanent storage" Git Push Error

Hey there, that error you're hitting when pushing to your Stash repo is almost always tied to server-side storage issues or repository integrity problems. Let's walk through practical steps to diagnose and fix this:

  • First, loop in your Stash server admin (if you aren't the one managing it)
    This error means Stash can't write Git objects to its permanent storage directory. The most common root causes here are:

    • The disk hosting Stash's repositories or home directory is full
    • The system user running Stash lacks write permissions to the Git repository storage path
    • A temporary glitch in the Stash service blocking file operations
  • If you have server access, check disk space right away
    SSH into the Stash server and run this command to view available disk space:

    df -h
    

    Look for the mount point where your Stash repos are stored — if it’s showing 100% used, you’ll need to free up space (delete old files, expand the disk, etc.) before pushes will succeed.

  • Verify repository integrity on the server
    Navigate to the directory of the problematic repository on the Stash server, then run:

    git fsck --full
    

    This scans for corrupted Git objects. If you see errors like missing objects or corrupted packs, you may need to restore the repo from a backup (note: Git repair tools are risky, so always back up first before using them).

  • Check Stash's server logs for precise details
    Look at the Stash application logs (usually located at $STASH_HOME/logs/atlassian-stash.log) — they’ll include specific error messages that pinpoint the exact issue, like IO errors, permission denials, or problems with the underlying storage system.

  • Try restarting the Stash service
    Sometimes a temporary hang in the Stash process causes this error. Restarting the service might resolve the issue if it’s just a transient glitch.

  • Quickly verify your local repo (just to rule out edge cases)
    While this is a remote rejection error, it doesn’t hurt to confirm your local branch is intact. Run:

    git fsck
    

    on your local machine to check for corrupted objects. You can also try fetching the latest remote state and rebasing/merging before pushing again, though this is a long shot for this specific error.

Your error log for reference:

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v origin feature/xxx:feature/xxx
POST git-receive-pack (3470 bytes)
Pushing to http://xxx@stash/xxx.git
To http://stash/xxx.git
! [remote rejected] feature/xxx -> feature/xxx (unable to migrate objects to permanent storage)
error: failed to push some refs to 'http://xxx@stash/xxx.git'
Completed with errors, see above.

内容的提问来源于stack exchange,提问作者Conor

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 08:12:03