Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #6394

Closed
Open
Created 11 years ago by Administrator@rootOwner
  • New issue

  • Report abuse

  • New issue

  • Report abuse

Unable to pop stash after upgrading; production config lost

Closed

Unable to pop stash after upgrading; production config lost

Created by: slhck

I tried to run git stash pop after the upgrade from 6.5.1 to 6.6.0 but I'm getting:

unable to refresh index

Which means the changes to my config/environments/production.rb were lost during the upgrade or something else went wrong.

Here are the relevant logs:

Shutting down both Unicorn and Sidekiq.
GitLab is not running.

werner@git /home/git/gitlab [6f6f158 *] % cd /home/git/gitlab
werner@git /home/git/gitlab [6f6f158 *] % sudo -u git -H ruby script/upgrade.rb
werner@git /home/git/gitlab [6f6f158 *] % git status
# HEAD detached at v6.5.1
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   config/environments/production.rb
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   public/assets/
#
no changes added to commit (use "git add" and/or "git commit -a")

werner@git /home/git/gitlab [6f6f158 *] % sudo -u git -H ruby script/upgrade.rb
GitLab 6 upgrade tool
Your version is 6.5.1
Latest available version for GitLab 6 is 6.6.0
Newer GitLab version is available
Do you want to upgrade (yes/no)? yes
Stash changed files
 -> git stash
Saved working directory and index state WIP on (no branch): 6f6f158 Version 6.5.1
HEAD is now at 6f6f158 Version 6.5.1
 -> OK
Get latest code
 -> git fetch
remote: Counting objects: 3118, done.
remote: Compressing objects: 100% (1571/1571), done.
remote: Total 3118 (delta 1906), reused 2337 (delta 1497)
Receiving objects: 100% (3118/3118), 27.79 MiB | 2.30 MiB/s, done.
Resolving deltas: 100% (1906/1906), done.
From https://github.com/gitlabhq/gitlabhq
   6f6f158..2ffa03a  6-5-stable -> origin/6-5-stable
 * [new branch]      6-6-stable -> origin/6-6-stable
   2adbc0b..71e7bff  master     -> origin/master
 * [new tag]         v6.6.0     -> v6.6.0
From https://github.com/gitlabhq/gitlabhq
 * [new tag]         v6.6.0.pre1 -> v6.6.0.pre1
 * [new tag]         v6.6.0.rc1 -> v6.6.0.rc1
 -> OK
Switch to new version
 -> git checkout v6.6.0
Previous HEAD position was 6f6f158... Version 6.5.1
HEAD is now at 490f99d... New stable branches and update guide
 -> OK
Install gems
 -> bundle
Fetching source index from https://rubygems.org/
Installing rake (10.1.1)
Installing ace-rails-ap (2.0.1)
Using i18n (0.6.9)

....


Clear cache
 -> bundle exec rake cache:clear RAILS_ENV=production
 -> OK
Done

werner@git /home/git/gitlab [490f99d] % git stash pop
unable to refresh index

Linked issues
0


  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: slhck

    Seems permission-related. When I run

    sudo -u git git stash pop

    I get the stashed changes back:

    warning: unable to access '/home/werner/.config/git/attributes': Permission denied
    warning: unable to access '/home/werner/.config/git/attributes': Permission denied
    warning: unable to access '/home/werner/.config/git/attributes': Permission denied
    warning: unable to access '/home/werner/.config/git/attributes': Permission denied
    warning: unable to access '/home/werner/.config/git/ignore': Permission denied
    # HEAD detached at v6.6.0
    # Changes not staged for commit:
    #   (use "git add <file>..." to update what will be committed)
    #   (use "git checkout -- <file>..." to discard changes in working directory)
    #
    #   modified:   config/environments/production.rb
    #
    no changes added to commit (use "git add" and/or "git commit -a")
    Dropped refs/stash@{0} (f90164fe0a10e314943f5104cc709766bb52dcf5)

    Perhaps the upgrading script readme should be updated to reflect that – or some permissions need changing?

    By Administrator on 2014-02-24T08:38:56 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: Razer6

    Is this still an issue on newer versions?

    By Administrator on 2014-07-26T09:44:05 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: slhck

    @Razer6 I don't know, I'm not in control of this server anymore. Like I mentioned, the easiest fix would've been to update the upgrade script's README to tell people to use sudo -u. Not sure if this is still relevant.

    By Administrator on 2014-07-26T13:54:12 (imported from GitLab project)

  • Administrator
    Administrator @root · 10 years ago
    Owner

    Created by: Razer6

    There is now an upgrade script which handles all for you :)

    By Administrator on 2014-08-18T11:26:18 (imported from GitLab project)

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
Assign to
Milestone
No milestone
None
None
Time tracking
Due date
None
None
1
Labels
Awaiting feedback
Assign labels
  • No matching results
  • Manage project labels
Confidentiality
Not confidential

You are going to turn on confidentiality. Only team members with at least Reporter access will be able to see and leave comments on the issue.

Lock issue
Unlocked
participants
Reference:

Menu

Projects Groups Snippets
Help