Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Pushing a new bugfix to gerrit
Forum Updated to NodeBB v4.3 + New Features

Pushing a new bugfix to gerrit

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 4 Posters 709 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • tukanT Offline
    tukanT Offline
    tukan
    wrote on last edited by tukan
    #1

    I'm trying to push new bugfix to the dev branch. I have setup the keys correctly as I can see the tests for gerrit.

    I have the small patch in the local dev branch (commit 38b4ff998f5ccab91c48b399b75963ebab031ef2 (HEAD -> dev))

    When I try to git gpush the commit I get this message:

    C:\prg\QT\qt5\qtbase>git gpush
    Enter passphrase for key 'C:\sec\qt\gerrit\qt_openssh_key_priv':
    Pushing 1 Change(s) for dev to 'gerrit':
      I318207c45 (Initial tray notification icon visibility)  [NEW]
    FATAL ERROR: Network error: Connection timed out
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    

    The test ssh codereview.qt-project.org gerrit stream-events passes. The Gerrit raw events are show at console.

    Could someone steer me in the right direction?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @tukan said in Pushing a new bugfix to gerrit:

      Could someone steer me in the right direction?

      See https://wiki.qt.io/Gerrit_Introduction - your push command is wrong.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      tukanT 1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        Do you get the same message if you use the classic push version ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • Christian EhrlicherC Christian Ehrlicher

          @tukan said in Pushing a new bugfix to gerrit:

          Could someone steer me in the right direction?

          See https://wiki.qt.io/Gerrit_Introduction - your push command is wrong.

          tukanT Offline
          tukanT Offline
          tukan
          wrote on last edited by
          #4

          Hi @Christian-Ehrlicher,

          I have read this part of the wiki too. Why is the push command wrong? I'm using git gpush excatly as shown in the tutorial you have posted link to. I have used the gpush as it was recommended.

          That would be this part of the tutorial:

          $ git gpush
          [same output as above]
          

          Hi @SGaist,

          I have tried to debug it again today.

          The git push gerrit HEAD:refs/for/dev does not work either:

          C:\prg\QT\qt5\qtbase>git push gerrit HEAD:refs/for/dev
          FATAL ERROR: Network error: Connection timed out
          fatal: Could not read from remote repository.
          
          Please make sure you have the correct access rights
          and the repository exists.
          

          I did run the init-scripts, but wanted to make sure the remote gerrit repo exists (it does):

          C:\prg\QT\qt5\qtbase>git remote add gerrit ssh://codereview.qt-project.org/qt/qtbase
          fatal: remote gerrit already exists.
          

          I wanted to make sure with ls-remote:

          C:\prg\QT\qt5\qtbase>git ls-remote gerrit
          FATAL ERROR: Network error: Connection timed out
          fatal: Could not read from remote repository.
          
          Please make sure you have the correct access rights
          and the repository exists.
          

          But it returns its url:

          C:\prg\QT\qt5\qtbase>git ls-remote --get-url gerrit
          ssh://codereview.qt-project.org/qt/qtbase.git
          
          I don't understand, why I see the url, but can't connect to the remote repository.
          
          Next I have tried to connect to the `ssh` to see if it will connect, to me it looks correct
          
          C:\prg\QT\qt5\qtbase>ssh ssh://tukan@codereview.qt-project.org
          Enter passphrase for key 'C:\sec\qt\gerrit\qt_openssh_key_priv':
          
            ****    Welcome to Gerrit Code Review    ****
          
            Hi tukan, you have successfully connected over SSH.
          
            Unfortunately, interactive shells are disabled.
            To clone a hosted Git repository, use:
          
            git clone ssh://tukan@codereview.qt-project.org:29418/REPOSITORY_NAME.git
          
          Connection to codereview.qt-project.org closed by remote host.
          Connection to codereview.qt-project.org closed.
          

          I tried to play around with the git's http timeout configuration (that did not help either):

          [http]
          lowSpeedLimit = 1000
          lowSpeedTime = 20
          

          I did check the repository if there is anything fishy, but it looks fine to me (did rebase to have the newest changes there):

          git log --summary
          commit 35199562a8968dc1c78a9b7ac3f5975f0e2ac199 (HEAD -> dev)
          Author: Patrik Svestka <scramble>
          Date:   Tue Jun 2 10:55:55 2020 +0200
          <commit message>
              Change-Id: I318207c4551004c9fac3b487cbeca9a97528e3d2
          
          commit 7ede57f937f988780d6751da34c941447ec6fd32 (origin/dev, origin/HEAD)
          Author: Assam Boudjelthia <scramble>
          Date:   Fri May 15 11:09:20 2020 +0300
          <commit message>
              Pick-to: 5.15
              Task-number: QTCREATORBUG-23768
              Change-Id: I76088358dc31be45adb766bed29e2c9d889a8f09
              Reviewed-by: hjk <scramble>
              Reviewed-by: Alessandro Portale <scramble>
          

          Thank you for helping me.

          aha_1980A 1 Reply Last reply
          0
          • Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #5

            How did you set up your Qt repo? Looks like your push url is wrong. Please exactly follow the instruction at the page I gave you.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            1
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Can you show the result of git remote -v ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              3
              • tukanT tukan

                Hi @Christian-Ehrlicher,

                I have read this part of the wiki too. Why is the push command wrong? I'm using git gpush excatly as shown in the tutorial you have posted link to. I have used the gpush as it was recommended.

                That would be this part of the tutorial:

                $ git gpush
                [same output as above]
                

                Hi @SGaist,

                I have tried to debug it again today.

                The git push gerrit HEAD:refs/for/dev does not work either:

                C:\prg\QT\qt5\qtbase>git push gerrit HEAD:refs/for/dev
                FATAL ERROR: Network error: Connection timed out
                fatal: Could not read from remote repository.
                
                Please make sure you have the correct access rights
                and the repository exists.
                

                I did run the init-scripts, but wanted to make sure the remote gerrit repo exists (it does):

                C:\prg\QT\qt5\qtbase>git remote add gerrit ssh://codereview.qt-project.org/qt/qtbase
                fatal: remote gerrit already exists.
                

                I wanted to make sure with ls-remote:

                C:\prg\QT\qt5\qtbase>git ls-remote gerrit
                FATAL ERROR: Network error: Connection timed out
                fatal: Could not read from remote repository.
                
                Please make sure you have the correct access rights
                and the repository exists.
                

                But it returns its url:

                C:\prg\QT\qt5\qtbase>git ls-remote --get-url gerrit
                ssh://codereview.qt-project.org/qt/qtbase.git
                
                I don't understand, why I see the url, but can't connect to the remote repository.
                
                Next I have tried to connect to the `ssh` to see if it will connect, to me it looks correct
                
                C:\prg\QT\qt5\qtbase>ssh ssh://tukan@codereview.qt-project.org
                Enter passphrase for key 'C:\sec\qt\gerrit\qt_openssh_key_priv':
                
                  ****    Welcome to Gerrit Code Review    ****
                
                  Hi tukan, you have successfully connected over SSH.
                
                  Unfortunately, interactive shells are disabled.
                  To clone a hosted Git repository, use:
                
                  git clone ssh://tukan@codereview.qt-project.org:29418/REPOSITORY_NAME.git
                
                Connection to codereview.qt-project.org closed by remote host.
                Connection to codereview.qt-project.org closed.
                

                I tried to play around with the git's http timeout configuration (that did not help either):

                [http]
                lowSpeedLimit = 1000
                lowSpeedTime = 20
                

                I did check the repository if there is anything fishy, but it looks fine to me (did rebase to have the newest changes there):

                git log --summary
                commit 35199562a8968dc1c78a9b7ac3f5975f0e2ac199 (HEAD -> dev)
                Author: Patrik Svestka <scramble>
                Date:   Tue Jun 2 10:55:55 2020 +0200
                <commit message>
                    Change-Id: I318207c4551004c9fac3b487cbeca9a97528e3d2
                
                commit 7ede57f937f988780d6751da34c941447ec6fd32 (origin/dev, origin/HEAD)
                Author: Assam Boudjelthia <scramble>
                Date:   Fri May 15 11:09:20 2020 +0300
                <commit message>
                    Pick-to: 5.15
                    Task-number: QTCREATORBUG-23768
                    Change-Id: I76088358dc31be45adb766bed29e2c9d889a8f09
                    Reviewed-by: hjk <scramble>
                    Reviewed-by: Alessandro Portale <scramble>
                

                Thank you for helping me.

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by aha_1980
                #7

                Hi @tukan,

                ssh://codereview.qt-project.org/qt/qtbase.git
                ssh://tukan@codereview.qt-project.org:29418/REPOSITORY_NAME.git

                What happens if you change the remote URL to ssh://tukan@codereview.qt-project.org:29418/qt/qbase.git as suggested?

                Qt has to stay free or it will die.

                1 Reply Last reply
                1
                • tukanT Offline
                  tukanT Offline
                  tukan
                  wrote on last edited by
                  #8

                  Thank you @Christian-Ehrlicher, @SGaist, @aha_1980 for assistence. After some fiddling around I managed to push the commit!

                  C:\prg\QT\qt5\qtbase>git push gerrit HEAD:refs/for/dev
                  Enumerating objects: 13, done.
                  Counting objects: 100% (13/13), done.
                  Delta compression using up to 8 threads
                  Compressing objects: 100% (7/7), done.
                  Writing objects: 100% (7/7), 845 bytes | 845.00 KiB/s, done.
                  Total 7 (delta 6), reused 0 (delta 0), pack-reused 0
                  remote: Resolving deltas: 100% (6/6)
                  remote: Processing changes: refs: 1, new: 1, done
                  remote:
                  remote: SUCCESS
                  remote:
                  remote:   https://codereview.qt-project.org/c/qt/qtbase/+/302953 Initial tray notification icon visibility [NEW]
                  remote:
                  To ssh://codereview.qt-project.org:29418/qt/qtbase.git
                   * [new branch]            HEAD -> refs/for/dev
                  

                  I don't know why the remote was wrong. I did not play around with it, till you pointed out the issue.

                  I had an issue with type on my side when changing the remote. I'm writing the details here so it can help someone in the future.

                  I did git remote set-url gerrit ssh://tukan@codereview.qt-project.org:29418/qt/qbase.git (notice the typo qbase not qtbase).

                  @SGaist
                  The original git remote -v:
                  C:\prg\QT\qt5\qtbase>git remote -v
                  gerrit ssh://codereview.qt-project.org/qt/qtbase.git (fetch)
                  gerrit ssh://codereview.qt-project.org/qt/qtbase.git (push)
                  origin git://code.qt.io/qt/qtbase.git (fetch)
                  origin git://code.qt.io/qt/qtbase.git (push)

                  now changed to as @aha_1980 suggested:
                  C:\prg\QT\qt5\qtbase>git remote -v
                  gerrit ssh://tukan@codereview.qt-project.org:29418/qt/qbase.git (fetch)
                  gerrit ssh://tukan@codereview.qt-project.org:29418/qt/qbase.git (push)
                  origin git://code.qt.io/qt/qtbase.git (fetch)
                  origin git://code.qt.io/qt/qtbase.git (push)

                  I have setup the git to use the plink (GIT_SSH=C:\<path>\PLINK.EXE) & pageant from putty suite so it won't ask me for passwd.

                  The error message was now different:

                  C:\prg\QT\qt5\qtbase>git push gerrit HEAD:refs/for/dev
                  fatal: project qt/qbase not found
                  fatal: Could not read from remote repository.

                  Please make sure you have the correct access rights
                  and the repository exists.

                  Next I noticed the typo:
                  I did change it to correct gerrit repository path:
                  git remote set-url gerrit ssh://tukan@codereview.qt-project.org:29418/qt/qtbase.git and it worked!

                  @Christian-Ehrlicher I did it as written in the wiki, clone and run the init-script on qt5. I did double check today the guide:

                  Set up a Gerrit account

                  1) Tweak your SSH config as instructed here [DONE]
                  2) Use the recommended Git settings, defined here [DONE]
                  3) Get the source code of the projects you want to contribute to [DONE]
                  4) executed init-repository for the qt5 repository [DONE]
                  

                  the .ssh config:

                  Host codereview.qt-project.org
                      Hostname codereview.qt-project.org
                      Port 29418
                      # Use your Gerrit username, not email or your username on your own machine.
                      # You can view this from Settings in gerrit when logged in.
                      User tukan
                      PreferredAuthentications publickey
                      IdentityFile ~/.ssh/id_rsa
                  

                  For future reference:

                  I started with the guide QT Contribution Guidelines. From there I followed a link the Building. Then made the change and when it did not work started to read all the docs around gerrit.

                  The command used for getting the source code:

                  First clone the top-level Qt 5 git repository:

                  $ git clone git://code.qt.io/qt/qt5.git
                  

                  Next I checkout the 5.15 & ran the init-repository

                  $ cd qt5
                  $ git checkout 5.15
                  $ perl init-repository
                  
                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved