Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. The Lounge
  4. Pushing to GitHub
Forum Update on Monday, May 27th 2025

Pushing to GitHub

Scheduled Pinned Locked Moved Solved The Lounge
10 Posts 4 Posters 1.3k Views
  • 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.
  • S Offline
    S Offline
    Sikarjan 0
    wrote on last edited by
    #1

    Hi!
    I took several attempts to push code to GitHub but I cannot figure out how to do it. I saw the posts here and I worked through the GitHub help. I also tried YouTube.

    The setting:
    I have an GitHub account with a few projects. These projects date back some years and I have pushed code successfully to GitHub. Also I saw that there were changes regarding signing in and I created a SSH key and connected it to my account as described in the GitHub manual.

    The issue:
    Wenn I use git push I am asked for a username and password. When I fill in my GitHub credentials I get the error that this method is deprecated.

    What am I missing? How can I switch to the new login method?

    Thanks for your help!

    Ronel_qtmasterR JonBJ 2 Replies Last reply
    0
    • JonBJ JonB

      @Sikarjan-0
      Hi. I use git & github, but I find it incredibly difficult/arcane. So many commands, so complex. I do not use it through Creator, as I use it outside of Qt too, I use the command line. I don't know if that relates to your situation. I shall be interested to learn from this thread too.

      I will try to help from what little I know/understand. You have heard of "The blind leading the blind", this is another one: "In the land of the blind the one-eyed man is King". You are the blind, I have the faulty one eye! Take everything I say with a pinch of salt as I may be wrong!

      I presume you mean you already have a local git repository and you want to push from that to github, right? I too have set up to use SSH key rather than password. In your git settings for your project/repo have you changed over the remote address from using https to using ssh on the Url? I thought that is what is required, while you use HTTPS it will still prompt for username+password?

      Or am I quite wrong here? I can see @Ronel_qtmaster has posted while I was typing, perhaps he can correct me. Also I don't know about "web browser" and opening/logging in automatically, I do not use any such, I just use a command line from Linux. It works fine with no prompting. I don't know the relationship between that way and webbrowser.

      S Offline
      S Offline
      Sikarjan 0
      wrote on last edited by
      #4

      Hi!

      Thanks for your input. I think I got it working again. My local repo was set to use https. This can be checked with:

      git remote show origin
      

      I used

      git remote set-url origin git+ssh://git@github.com/username/reponame.git
      

      To change it to ssh.

      After that I am able agin to push from the command line and through Qt Creator.

      I do not know yet how to set up a project correctly in the first place but I hope this helps other to get their old repos working again. Reminder, a ssh key needs to be setup first. See here for instructions.

      1 Reply Last reply
      1
      • S Sikarjan 0

        Hi!
        I took several attempts to push code to GitHub but I cannot figure out how to do it. I saw the posts here and I worked through the GitHub help. I also tried YouTube.

        The setting:
        I have an GitHub account with a few projects. These projects date back some years and I have pushed code successfully to GitHub. Also I saw that there were changes regarding signing in and I created a SSH key and connected it to my account as described in the GitHub manual.

        The issue:
        Wenn I use git push I am asked for a username and password. When I fill in my GitHub credentials I get the error that this method is deprecated.

        What am I missing? How can I switch to the new login method?

        Thanks for your help!

        Ronel_qtmasterR Offline
        Ronel_qtmasterR Offline
        Ronel_qtmaster
        wrote on last edited by
        #2

        @Sikarjan-0 Hi
        I would not advice you to put manually your credential when you want to push with git, because there is a timeout for that.If you don't respect it you will always encounter errors.

        1.If you have added your git account to git command line, you have to firstly commit to the local repository, then use git push after
        2.The easiest way is to register your git account in your webbrowser, so that each time its ask the browser will open and login automatically

        1 Reply Last reply
        0
        • S Sikarjan 0

          Hi!
          I took several attempts to push code to GitHub but I cannot figure out how to do it. I saw the posts here and I worked through the GitHub help. I also tried YouTube.

          The setting:
          I have an GitHub account with a few projects. These projects date back some years and I have pushed code successfully to GitHub. Also I saw that there were changes regarding signing in and I created a SSH key and connected it to my account as described in the GitHub manual.

          The issue:
          Wenn I use git push I am asked for a username and password. When I fill in my GitHub credentials I get the error that this method is deprecated.

          What am I missing? How can I switch to the new login method?

          Thanks for your help!

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #3

          @Sikarjan-0
          Hi. I use git & github, but I find it incredibly difficult/arcane. So many commands, so complex. I do not use it through Creator, as I use it outside of Qt too, I use the command line. I don't know if that relates to your situation. I shall be interested to learn from this thread too.

          I will try to help from what little I know/understand. You have heard of "The blind leading the blind", this is another one: "In the land of the blind the one-eyed man is King". You are the blind, I have the faulty one eye! Take everything I say with a pinch of salt as I may be wrong!

          I presume you mean you already have a local git repository and you want to push from that to github, right? I too have set up to use SSH key rather than password. In your git settings for your project/repo have you changed over the remote address from using https to using ssh on the Url? I thought that is what is required, while you use HTTPS it will still prompt for username+password?

          Or am I quite wrong here? I can see @Ronel_qtmaster has posted while I was typing, perhaps he can correct me. Also I don't know about "web browser" and opening/logging in automatically, I do not use any such, I just use a command line from Linux. It works fine with no prompting. I don't know the relationship between that way and webbrowser.

          S Ronel_qtmasterR 2 Replies Last reply
          0
          • JonBJ JonB

            @Sikarjan-0
            Hi. I use git & github, but I find it incredibly difficult/arcane. So many commands, so complex. I do not use it through Creator, as I use it outside of Qt too, I use the command line. I don't know if that relates to your situation. I shall be interested to learn from this thread too.

            I will try to help from what little I know/understand. You have heard of "The blind leading the blind", this is another one: "In the land of the blind the one-eyed man is King". You are the blind, I have the faulty one eye! Take everything I say with a pinch of salt as I may be wrong!

            I presume you mean you already have a local git repository and you want to push from that to github, right? I too have set up to use SSH key rather than password. In your git settings for your project/repo have you changed over the remote address from using https to using ssh on the Url? I thought that is what is required, while you use HTTPS it will still prompt for username+password?

            Or am I quite wrong here? I can see @Ronel_qtmaster has posted while I was typing, perhaps he can correct me. Also I don't know about "web browser" and opening/logging in automatically, I do not use any such, I just use a command line from Linux. It works fine with no prompting. I don't know the relationship between that way and webbrowser.

            S Offline
            S Offline
            Sikarjan 0
            wrote on last edited by
            #4

            Hi!

            Thanks for your input. I think I got it working again. My local repo was set to use https. This can be checked with:

            git remote show origin
            

            I used

            git remote set-url origin git+ssh://git@github.com/username/reponame.git
            

            To change it to ssh.

            After that I am able agin to push from the command line and through Qt Creator.

            I do not know yet how to set up a project correctly in the first place but I hope this helps other to get their old repos working again. Reminder, a ssh key needs to be setup first. See here for instructions.

            1 Reply Last reply
            1
            • S Sikarjan 0 has marked this topic as solved on
            • JonBJ JonB

              @Sikarjan-0
              Hi. I use git & github, but I find it incredibly difficult/arcane. So many commands, so complex. I do not use it through Creator, as I use it outside of Qt too, I use the command line. I don't know if that relates to your situation. I shall be interested to learn from this thread too.

              I will try to help from what little I know/understand. You have heard of "The blind leading the blind", this is another one: "In the land of the blind the one-eyed man is King". You are the blind, I have the faulty one eye! Take everything I say with a pinch of salt as I may be wrong!

              I presume you mean you already have a local git repository and you want to push from that to github, right? I too have set up to use SSH key rather than password. In your git settings for your project/repo have you changed over the remote address from using https to using ssh on the Url? I thought that is what is required, while you use HTTPS it will still prompt for username+password?

              Or am I quite wrong here? I can see @Ronel_qtmaster has posted while I was typing, perhaps he can correct me. Also I don't know about "web browser" and opening/logging in automatically, I do not use any such, I just use a command line from Linux. It works fine with no prompting. I don't know the relationship between that way and webbrowser.

              Ronel_qtmasterR Offline
              Ronel_qtmasterR Offline
              Ronel_qtmaster
              wrote on last edited by
              #5

              @JonB when you install git and you do not setup your account locally, it will ask= you username and password everytime you want to push.The prompt can be opened in qt in such cases, and the webbrowser when you use command line

              JonBJ 1 Reply Last reply
              0
              • Ronel_qtmasterR Ronel_qtmaster

                @JonB when you install git and you do not setup your account locally, it will ask= you username and password everytime you want to push.The prompt can be opened in qt in such cases, and the webbrowser when you use command line

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #6

                @Ronel_qtmaster said in Pushing to GitHub:

                when you install git and you do not setup your account locally

                I don't really know what that means. Once I changed over from https to ssh (with my SSH key set up in local file) it never asks for credentials again without my having to do anything and no matter where I use it from (no requirement for web browser). That seems to be @Sikarjan-0's case now, and is all I know.

                Ronel_qtmasterR 1 Reply Last reply
                0
                • JonBJ JonB

                  @Ronel_qtmaster said in Pushing to GitHub:

                  when you install git and you do not setup your account locally

                  I don't really know what that means. Once I changed over from https to ssh (with my SSH key set up in local file) it never asks for credentials again without my having to do anything and no matter where I use it from (no requirement for web browser). That seems to be @Sikarjan-0's case now, and is all I know.

                  Ronel_qtmasterR Offline
                  Ronel_qtmasterR Offline
                  Ronel_qtmaster
                  wrote on last edited by Ronel_qtmaster
                  #7

                  @JonB Good point.I though he wanted asolutely to find a solution with credentials.I am using Git with https.Never though of switching to SSH though

                  JonBJ 1 Reply Last reply
                  0
                  • Ronel_qtmasterR Ronel_qtmaster

                    @JonB Good point.I though he wanted asolutely to find a solution with credentials.I am using Git with https.Never though of switching to SSH though

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by JonB
                    #8

                    @Ronel_qtmaster said in Pushing to GitHub:

                    I am using Git with https.Never though of switching to SSH though

                    You may know more than I. Does/doesn't this mean that every time you want to use it you have to log in (providing credentials) once (per reboot)? You might do that login in a web browser, I don't know? Once I was advised to set up ssh (with that credentials file stored somewhere hidden down inside my home directory) I never get prompted to enter them again, anything that wants credentials just automatically takes it from there. I am glad I moved from https to ssh, even though I forget the details.

                    Ronel_qtmasterR SGaistS 2 Replies Last reply
                    0
                    • JonBJ JonB

                      @Ronel_qtmaster said in Pushing to GitHub:

                      I am using Git with https.Never though of switching to SSH though

                      You may know more than I. Does/doesn't this mean that every time you want to use it you have to log in (providing credentials) once (per reboot)? You might do that login in a web browser, I don't know? Once I was advised to set up ssh (with that credentials file stored somewhere hidden down inside my home directory) I never get prompted to enter them again, anything that wants credentials just automatically takes it from there. I am glad I moved from https to ssh, even though I forget the details.

                      Ronel_qtmasterR Offline
                      Ronel_qtmasterR Offline
                      Ronel_qtmaster
                      wrote on last edited by
                      #9

                      @JonB okay i will give it a go

                      1 Reply Last reply
                      0
                      • JonBJ JonB

                        @Ronel_qtmaster said in Pushing to GitHub:

                        I am using Git with https.Never though of switching to SSH though

                        You may know more than I. Does/doesn't this mean that every time you want to use it you have to log in (providing credentials) once (per reboot)? You might do that login in a web browser, I don't know? Once I was advised to set up ssh (with that credentials file stored somewhere hidden down inside my home directory) I never get prompted to enter them again, anything that wants credentials just automatically takes it from there. I am glad I moved from https to ssh, even though I forget the details.

                        SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #10

                        @JonB said in Pushing to GitHub:

                        @Ronel_qtmaster said in Pushing to GitHub:

                        I am using Git with https.Never though of switching to SSH though

                        You may know more than I. Does/doesn't this mean that every time you want to use it you have to log in (providing credentials) once (per reboot)? You might do that login in a web browser, I don't know? Once I was advised to set up ssh (with that credentials file stored somewhere hidden down inside my home directory) I never get prompted to enter them again, anything that wants credentials just automatically takes it from there. I am glad I moved from https to ssh, even though I forget the details.

                        Something to think about: either your ssh key is not protected by a password or it's unlocked because it's configured in your system keychain (or equivalent). If the former, I would advise to reconsider as if the file gets accessed without your knowledge, everything you have access to with it will be as well to that other person.

                        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

                        • Login

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