MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Question about backup script

    Scheduled Pinned Locked Moved General Discussion
    30 Posts 3 Posters 7.0k Views 3 Watching
    Loading More Posts
    • 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.
    • R Offline
      rkorell Module Developer @sdetweil
      last edited by

      @sdetweil said in Question about backup script:

      how to use git config

      OK, thanks.
      I had understood that this is a config of your scripts, sorry.

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @rkorell
        last edited by

        @rkorell no… you can store config settings for git (the source code repository tool MagicMirror uses and most modules use (…git clone))
        and the way to make the repository that the backup uses

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        R 1 Reply Last reply Reply Quote 1
        • R Offline
          rkorell Module Developer @sdetweil
          last edited by rkorell

          @sdetweil as far as google told me it seems, I need to install Git CLI - which is not easy available for Raspi.

          Any hint?

          Sorry!
          Ralf

          R S 2 Replies Last reply Reply Quote 0
          • R Offline
            rkorell Module Developer @rkorell
            last edited by rkorell

            O.K,. Google is not my friend today…
            It seems that a “.gitconfig” file will do the trick …
            Will double check.

            R 1 Reply Last reply Reply Quote 0
            • R Offline
              rkorell Module Developer @rkorell
              last edited by

              Nope.
              Doesnt’t work.
              Have created a “.gitconfig” file with

              git config --global --edit
              

              Entered user, email and password - but your script asks again for “user” …

              ???

              Thanks
              Ralf

              S 1 Reply Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @rkorell
                last edited by

                @rkorell the SCRIPT does not prompt

                I use these git config parms

                if [ "$user_name." == "." ]; then
                	# prompt for users name
                	git config --local user.name $user_name
                else	
                	git config --local user.name $user_name
                fi
                if [ "$email." == "." ]; then
                	# prompt for email address
                	git config --local user.email $email
                else
                	git config --local user.email $email
                fi
                

                git will prompt

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                R 1 Reply Last reply Reply Quote 0
                • S Do not disturb
                  sdetweil @rkorell
                  last edited by

                  @rkorell you HAVE the git cli

                  git --help
                  (–local means in this folder only)

                  git config --local user.name “your name”
                  git config --local user.email “your email”

                  see here

                  https://stackoverflow.com/questions/35942754/how-can-i-save-username-and-password-in-git

                  and username means github userid

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  R 1 Reply Last reply Reply Quote 0
                  • R Offline
                    rkorell Module Developer @sdetweil
                    last edited by rkorell

                    @sdetweil said in Question about backup script:

                    @rkorell the SCRIPT does not prompt
                    I use these git config parms

                    OK, where do you get this from?
                    If I have a look at your other post „local means this folder only“ let me assume that you may look at „$HOME/MagicMirror/.gitconfig“
                    Is this true?
                    Than this cannot work because my

                    git config --global --edit
                    

                    created a .gitconfig in $HOME …

                    Will at least try your suggestion with git config … (THANKS for this - the stackoverflow article will be chacked as well)

                    Warmest regards,

                    Ralf

                    S 2 Replies Last reply Reply Quote 0
                    • S Do not disturb
                      sdetweil @rkorell
                      last edited by

                      @rkorell if you don’t have a global ($HOME) git config,
                      i dont presume to decide this for you.
                      so i only set it in the MM_backup folder

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @rkorell
                        last edited by

                        @rkorell git will look local first and global second

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • R Offline
                          rkorell Module Developer @sdetweil
                          last edited by

                          @sdetweil
                          Your:

                          git config --local user.name “my name”
                          git config --local user.email “my email”
                          plus
                          git config --local user.password “myverylonggithubtoken”

                          does the trick…

                          The stackoverflow article is confusing to me but your suggestion is there :-)
                          Thanks a lot!

                          Warm regards,
                          Ralf

                          1 Reply Last reply Reply Quote 0

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          • 1
                          • 2
                          • 2 / 2
                          • First post
                            Last post
                          Enjoying MagicMirror? Please consider a donation!
                          MagicMirror created by Michael Teeuw.
                          Forum managed by Sam, technical setup by Karsten.
                          This forum is using NodeBB as its core | Contributors
                          Contact | Privacy Policy