Skip to content

Unable to upgrade Flutter: The Flutter SDK is tracking a non-standard remote #98020

Description

@nicolasvac

Steps to Reproduce

  1. Execute flutter upgrade

Expected results: The flutter tool upgrades.

Actual results: It says i am tracking a different repo for upgrade when the URLs are equal.

>flutter upgrade
Unable to upgrade Flutter: The Flutter SDK is tracking a non-standard remote "ssh://[email protected]/flutter/flutter.git".
Set the environment variable "FLUTTER_GIT_URL" to "ssh://[email protected]/flutter/flutter.git", and retry. Alternatively, re-install Flutter by going to https://flutter.dev/docs/get-started/install.
If this is intentional, it is recommended to use "git" directly to keep Flutter SDK up-to date.
Logs
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Versione 10.0.19044.1503], locale it-IT)
    • Flutter version 2.8.1 at C:\flutter
    • Upstream repository ssh://[email protected]/flutter/flutter.git
    • Framework revision 77d935af4d (8 weeks ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at C:\Users\nicol\AppData\Local\Android\sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 2021.1)
    • Android Studio at C:\Users\nicol\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\211.7628.21.2111.8139111
    • Flutter plugin version 64.0.2
    • Dart plugin version 211.7798
    • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)

[√] IntelliJ IDEA Ultimate Edition (version 2021.3)
    • IntelliJ at C:\Users\nicol\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\213.6777.52
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart

[√] VS Code (version 1.64.0)
    • VS Code at C:\Users\nicol\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.34.0

[√] Connected device (2 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 98.0.4758.81
    • Edge (web)   • edge   • web-javascript • Microsoft Edge 97.0.1072.76

! Doctor found issues in 1 category.

image

Activity

  1. maheshj01 commented on Feb 8, 2022

    @maheshj01
    Member

    Hi @nicolasvac, Thanks for filing the issue. This seems like an issue with your git configuration, Could you please try adding the https URL rather than ssh to the SDK repo by

    cd path_to_flutter_Sdk
    git remote set-url origin https://github.com/flutter/flutter.git 
    flutter upgrade
    
  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 8, 2022
  3. nicolasvac commented on Feb 9, 2022

    @nicolasvac
    ContributorAuthor

    Still the same.

    C:\flutter>git remote set-url origin https://github.com/flutter/flutter.git
    
    C:\flutter>flutter upgrade
    Unable to upgrade Flutter: The Flutter SDK is tracking a non-standard remote "ssh://[email protected]/flutter/flutter.git".
    Set the environment variable "FLUTTER_GIT_URL" to "ssh://[email protected]/flutter/flutter.git", and retry. Alternatively, re-install Flutter by going to https://flutter.dev/docs/get-started/install.
    If this is intentional, it is recommended to use "git" directly to keep Flutter SDK up-to date.
    
    C:\flutter>
    
  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 9, 2022
  5. maheshj01 commented on Feb 9, 2022

    @maheshj01
    Member

    can you please share the output of git remote -v by navigating inside the flutter repository?

  6. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 9, 2022
  7. nicolasvac commented on Feb 9, 2022

    @nicolasvac
    ContributorAuthor

    @maheshmnj Done:

    PS C:\Users\nicol> cd C:\flutter
    PS C:\flutter> git remote -v
    origin  ssh://[email protected]/flutter/flutter.git (fetch)
    origin  ssh://[email protected]/flutter/flutter.git (push)
    PS C:\flutter> flutter upgrade
    Unable to upgrade Flutter: The Flutter SDK is tracking a non-standard remote "ssh://[email protected]/flutter/flutter.git".
    Set the environment variable "FLUTTER_GIT_URL" to "ssh://[email protected]/flutter/flutter.git", and retry. Alternatively, re-install Flutter by going to https://flutter.dev/docs/get-started/install.
    If this is intentional, it is recommended to use "git" directly to keep Flutter SDK up-to date.
    PS C:\flutter>
    
  8. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 9, 2022
  9. maheshj01 commented on Feb 10, 2022

    @maheshj01
    Member

    @nicolasvac, it looks like there is some issue with ssh URL Please try removing it and adding a https URL. You can do this by
    running

    git remote rm origin
    git remote add origin https://github.com/flutter/flutter.git

    Now ensure that your remote is a https URL (for both push and pull) by running git remote -v, once set then please try upgrading flutter.

  10. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 10, 2022
  11. nicolasvac commented on Feb 10, 2022

    @nicolasvac
    ContributorAuthor

    I've setup my git to replace every https of github with ssh, to not have problems with golang.

    Honestly speaking the flutter tool should check for both the https version and the ssh version, as they are both valid source of git.

  12. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 10, 2022
  13. maheshj01 commented on Feb 11, 2022

    @maheshj01
    Member

    @nicolasvac I believe the flutter tool does support ssh URLs too, if this is not the case I do agree that we should support it. Could you please confirm, whether it is working with https url?

  14. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Feb 11, 2022
  15. 17 remaining items

  16. divan commented on Dec 30, 2022

    @divan

    Is there any solution to this issue other than removing git url rewrite?

  17. AldoMX commented on Jan 1, 2023

    @AldoMX

    No, but this rewrite fixed the issue:

    [url "[email protected]:"]
            insteadOf = https://github.com/
    
  18. romka18 commented on Jul 3, 2023

    @romka18

    git branch --set-upstream-to=origin/stable stable worked for me

  19. added
    P3Issues that are less important to the Flutter project
    triaged-toolTriaged by Flutter Tool team
    on Jul 21, 2023
  20. added a commit that references this issue on Jul 27, 2023
    7d64c67
  21. added 2 commits that reference this issue on Jul 31, 2023
    f9215d2
  22. added a commit that references this issue on Aug 2, 2023
    5cc8b82
  23. github-actions commented on Aug 10, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  24. locked as resolved and limited conversation to collaborators on Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions