Getting started with Ansible 03 - Setting up the Git Repository

Поделиться
HTML-код
  • Опубликовано: 30 июл 2020
  • Ansible is an incredible configuration management and provisioning utility that enables you to automate all the things. In this series, you'll learn everything you need to know in order to use Ansible for your day-to-day administration duties. In part 3, we take a look at another foundational concept - Git. Everyone who effectively implements automation uses Git, and in this video, we look into creating a repository and how to push changes.
    Full series:
    Part 1 (Introduction): linux.video/ansible1
    Part 2 (SSH Overview & Setup): linux.video/ansible2
    Part 3 (This video)
    Part 4 (Running Commands): linux.video/ansible4
    Part 5 (Running Elevated Commands): linux.video/ansible5
    Part 6 (Writing our first Playbook): linux.video/ansible6
    Part 7 (The "when" Conditional): linux.video/ansible7
    Part 8 (Improving your Playbook): linux.video/ansible8
    Part 9 (Targeting Specific Nodes): linux.video/ansible9
    Part 10 (Tags): linux.video/ansible10
    Part 11 (Managing Files): linux.video/ansible11
    Part 12 (Managing Services): linux.video/ansible12
    Part 13 (Adding Users & Bootstrapping): linux.video/ansible13
    Part 14 (Roles): linux.video/ansible14
    Part 15 (Host Variables): linux.video/ansible15
    Part 16 (Templates): linux.video/ansible16
    🙌 Support me on Patreon and get early access to new content!
    ➡️ learnlinux.link/patron
    🛒 Affiliate store for Linux compatible hardware/accessories (commission earned):
    ➡️ learnlinux.link/amazon
    💻 Check out the Tiny Pilot KVM for your Homelab (commission earned):
    ➡️ learnlinux.link/tinypilot
    Wiki article for this video:
    www.learnlinux.tv/getting-sta...
    🐦 Follow me on Twitter!
    ➡️ learnlinux.link/twitter
    💬 Official LearnLinux.tv Community:
    ➡️ community.learnlinux.tv
    📖 Check out jay's latest book, Mastering Ubuntu Server 3rd Edition. Available now!
    ➡️ ubuntuserverbook.com
    👨 More about me:
    ➡️ www.jaylacroix.com
    ➡️ www.learnlinux.tv/about-me
    💽 How to create a bootable flash drive for installing Linux:
    ➡️ linux.video/flash-usb
    🐧 Which distro do I use?
    ➡️ learnlinux.link/mydistro
    🔐 How to better secure OpenSSH:
    ➡️ linux.video/secure-ssh
    ☁️ How to create a cloud Linux server with Linode:
    ➡️ learnlinux.link/create-linode
    #Ansible #Linux #LearnLinux
  • НаукаНаука

Комментарии • 65

  • @Smaxey843
    @Smaxey843 10 месяцев назад +26

    For those total newbies in 2023 creating fresh github accounts and new branches- my default command needed to be "git push origin main" as the name space for 'master' didnt exist but 'main' did. Maybe a small change over the past two years or so since the video was released.

    • @cheebadigga4092
      @cheebadigga4092 Месяц назад

      yeah github changed the default branch to 'main' because of "moral reasons" or something - they didn't like the master/slave notations although it is commonly used in IT

    • @curryyuan6534
      @curryyuan6534 Месяц назад

      Or to check and try "git show-ref" to see what refs you have. Is there a refs/heads/master or refs/heads/main?

    • @nelo3242
      @nelo3242 9 дней назад

      "git push" by itself also worked for me

  • @manjubeli
    @manjubeli 3 года назад +54

    This is what most of the other tutorials on RUclips/Udemy/PluaralSight is missing. They just jump into the topic without any foundation. Thank you for making this video. Subbed.

    • @TheEmperorXavier
      @TheEmperorXavier 22 дня назад

      I was thinking the same thing. It’s blaming my mind how relatable Git is to me now. And I’m not a software developer

  • @kapurar
    @kapurar 2 года назад +6

    Jay these tutorial are fantastic! You explain everything very well and at a pace that makes it easy to learn. Thank you!

  • @Weirj
    @Weirj 2 года назад +18

    slight PSA: Github change "master" to "main" so I had to use "git push origin main" instead of "git push origin master"

    • @techdad6135
      @techdad6135 2 года назад +1

      Thank you! I was also having a problem using master.

    • @Weirj
      @Weirj 2 года назад +1

      @@techdad6135 yeah.. they changed it not to long ago.. TBH master isn’t the best of words to use

    • @fabrice9848
      @fabrice9848 11 месяцев назад +3

      @@Weirj Please stop feeding the woke nonsense. master was a perfectly fine word.

    • @Weirj
      @Weirj 11 месяцев назад +2

      @@fabrice9848 I didn’t make the change… I was just letting people know why it won’t work if you use “master” which was in the video. Enjoy.

    • @jserien08
      @jserien08 11 месяцев назад +3

      just lost two days because of this silly syntax change in github

  • @MichaelRosas-kx8pi
    @MichaelRosas-kx8pi Месяц назад

    Dude, thank you very much for your Ansible videos. They are EXCELLENT!!!

  • @parimalpatel7190
    @parimalpatel7190 3 года назад +7

    Till now, I am able to grasp the content.
    Thank you.

  • @rullywow3834
    @rullywow3834 3 года назад +1

    Awesome content, well explained. Thanks, Jay!

  • @mathewkargarzadeh3158
    @mathewkargarzadeh3158 2 года назад

    Amazing Channel. I really appreciate your time reaching us great stuff. Mat

  • @balloney2175
    @balloney2175 2 года назад

    I love Jay's clear voice. I don't need to activate captions.

  • @anothergoogleaccount4500
    @anothergoogleaccount4500 3 года назад +27

    make sure 'master' is really the name of YOUR branch, it could be 'main' or anything else. Otherwise it's going to output an error.

    • @balloney2175
      @balloney2175 2 года назад +3

      just "git push" works for me

    • @jmckey
      @jmckey Год назад +1

      Yeah, I didn't realize I had to make the branch names match this way so I just troubleshot the error and then did a "git checkout -b master' and then redid the git commands and that worked. Though I had then created a 2nd branch in my repository on called 'master' and so had to swap from 'main' being the default to 'master' being the default. Good learning stumble regardless.

  • @Awas79
    @Awas79 Год назад

    Awesome video

  • @Daxter296
    @Daxter296 2 года назад +5

    Just in case anyone panics, like I did, when using "git push origin master". Master was changed to main in late 2020

  • @raul230285
    @raul230285 6 месяцев назад

    Jay these tutorial are fantastic!

  • @asaf158
    @asaf158 3 года назад

    Just love you m8,
    Amazing channel :-)

  • @stampeder1686
    @stampeder1686 9 месяцев назад

    Great series!! You fill in the blanks in my ansible knowledge. Quick question. What is Unicorn? Keep the great stuff coming.

  • @naelayach6084
    @naelayach6084 9 месяцев назад

    great video thanks

  • @grahammccann8554
    @grahammccann8554 3 года назад

    Thank you Jay :-)

  • @vnetpost
    @vnetpost 2 года назад

    Thanks jay

  • @SilentSolution
    @SilentSolution 2 года назад

    Thanks sir

  • @MichaelSmith-fg8xh
    @MichaelSmith-fg8xh 2 года назад +3

    the "git clone" fails for me if I don't use a standard (auto-generated) name for the key

  • @not-normal771
    @not-normal771 6 месяцев назад

    What kind of music is that in the intro and outro? I would enjoy hearing more like it. Thanks in advance.

  • @mihai6564
    @mihai6564 Год назад

    good video

  • @AnlUreturk
    @AnlUreturk 29 дней назад

    Great

  • @lasin7743
    @lasin7743 3 года назад +24

    It's ** git push origin main ** now.

    • @noelmasong9223
      @noelmasong9223 3 года назад +1

      Wew! lucky saw this comment.. i was getting an error using " git push origin master" =) Thanks for this mate

    • @lasin7743
      @lasin7743 3 года назад +1

      @@noelmasong9223 you're most welcome. Have a great day. :)

    • @grahammccann8554
      @grahammccann8554 3 года назад +1

      Thanks Las In.. :-)

    • @Ray_TambaBudol_Marcos
      @Ray_TambaBudol_Marcos 2 года назад +1

      BRO!!!! you are so right my friend, that just fix my Error Problems. your the best!

    • @lalit567
      @lalit567 Год назад

      i tried main but its asking for username and password and showing message that "Support for password authentication was removed on August 13, 2021. Please use a personal access token instead."
      Please suggest how to fix it...

  • @liljaaccount5838
    @liljaaccount5838 2 года назад

    super

  • @Lekahiak
    @Lekahiak 3 года назад

    subbed

  • @TheTacoExpress82
    @TheTacoExpress82 8 месяцев назад

    nice Paw Patrol reference

  • @mikejetter145
    @mikejetter145 3 года назад

    When I goto push my files to github, it prompts me for my github username\password each time. Is there a way to save the github credentials?

    • @crackpotmark
      @crackpotmark 3 года назад

      Make sure you have your ssh public key on github, and the private key connected to ssh-agent.

    • @parimalpatel7190
      @parimalpatel7190 3 года назад

      Hey Mike, I also had the same issue because I had selected "Clone with HTTPS" option.
      But as per Jay we have to select "Clone with SSH" at 6:10 so that while pushing the changes to GITHUB it don't prompts for username and password.
      Also we have to ensure that our passphrase for ansible key is cached.

    • @VidiotGeek
      @VidiotGeek 3 года назад

      I think that's why Jay said to set "user.name" and "user.email" in the global defaults. I discovered that if you have 2FA enabled on your Github account, it seems like you have to use the HTTPS links. You also have to create a "Personal Access Token" on the site, essentially an app-specific password to use instead of your regular user/pass combo.

  • @guyboisvert66
    @guyboisvert66 2 года назад

    git push origin master --> error: src refspec master does not match any
    What should we do to fix this?
    By the way, very good tutorial!

    • @pacman129
      @pacman129 2 года назад +1

      Use main instead of master

    • @marcelosaad8312
      @marcelosaad8312 2 года назад +1

      use
      #git push

    • @lalit567
      @lalit567 Год назад

      @@pacman129 i tried main but its asking for username and password and showing message that "Support for password authentication was removed on August 13, 2021. Please use a personal access token instead."
      Please suggest how to fix it...

    • @lalit567
      @lalit567 Год назад

      Issue resolved by creating personal access token in Git and using it instead of password.

  • @FirstnameLastname-gy4bz
    @FirstnameLastname-gy4bz 11 месяцев назад +1

    your videos are everything except Ansible... arent there anyone who would just get into the thing?

    • @jserien08
      @jserien08 11 месяцев назад +1

      I was thinking like you, but frankly, knowing a bit af ssh and a bit of git is part of the IT driving licence today, so I would say : "trust jay, he knows what he is doing"

  • @user-rz2jy2ve6q
    @user-rz2jy2ve6q 10 месяцев назад

    a tutorial with not git repo address!??

  • @MrShiffles
    @MrShiffles Год назад

    They must have changed something on github recently because following everything you do stops working when I try to git push...then I get authentication errors...
    Done! Moving on to something else ...cuz i dont have the time or patience
    Fuck Ansible

  • @genericdeveloper3966
    @genericdeveloper3966 9 месяцев назад

    If I'm looking to use Ansible I already know how to set up a git repo. Let's cut to the chase.

  • @oluwasegunfunmisamuel3125
    @oluwasegunfunmisamuel3125 2 года назад

    I get this error while i was pushing my changes to the master {Error: src refspec master does not match any error: failed to push some refs to git@githum.com:********/ansible-tutorial.git} do you know why this is happening ? Thanks