Getting started with Ansible 03 - Setting up the Git Repository

แชร์
ฝัง
  • เผยแพร่เมื่อ 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 11 หลายเดือนก่อน +34

    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 2 หลายเดือนก่อน +1

      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 2 หลายเดือนก่อน

      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 หลายเดือนก่อน

      "git push" by itself also worked for me

  • @manjubeli
    @manjubeli 3 ปีที่แล้ว +55

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

    • @TheEmperorXavier
      @TheEmperorXavier หลายเดือนก่อน

      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

  • @Lexxal_
    @Lexxal_ 23 วันที่ผ่านมา

    The way you review everything you explained at the end, is such a good way to comprehend all the stuff you've explained. You're very good! Thank you Jay

  • @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!

  • @Weirlive
    @Weirlive 2 ปีที่แล้ว +19

    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.

    • @Weirlive
      @Weirlive 2 ปีที่แล้ว +1

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

    • @fabrice9848
      @fabrice9848 ปีที่แล้ว +3

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

    • @Weirlive
      @Weirlive ปีที่แล้ว +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 ปีที่แล้ว +3

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

  • @rullywow3834
    @rullywow3834 3 ปีที่แล้ว +1

    Awesome content, well explained. Thanks, Jay!

  • @parimalpatel7190
    @parimalpatel7190 3 ปีที่แล้ว +7

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

    • @yewaleajayable
      @yewaleajayable 3 ปีที่แล้ว +2

      Same here. Tons of thanks!!!

  • @mathewkargarzadeh3158
    @mathewkargarzadeh3158 2 ปีที่แล้ว

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

  • @MichaelRosas-kx8pi
    @MichaelRosas-kx8pi 2 หลายเดือนก่อน

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

  • @balloney2175
    @balloney2175 2 ปีที่แล้ว

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

  • @raul230285
    @raul230285 7 หลายเดือนก่อน

    Jay these tutorial are fantastic!

    • @LearnLinuxTV
      @LearnLinuxTV  7 หลายเดือนก่อน

      Glad you like them!

  • @Awas79
    @Awas79 ปีที่แล้ว

    Awesome video

  • @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.

  • @asaf158
    @asaf158 3 ปีที่แล้ว

    Just love you m8,
    Amazing channel :-)

  • @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

  • @stampeder1686
    @stampeder1686 10 หลายเดือนก่อน

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

  • @naelayach6084
    @naelayach6084 11 หลายเดือนก่อน

    great video thanks

  • @grahammccann8554
    @grahammccann8554 3 ปีที่แล้ว

    Thank you Jay :-)

  • @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 2 ปีที่แล้ว

      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...

  • @vnetpost
    @vnetpost 2 ปีที่แล้ว

    Thanks jay

  • @SilentSolution
    @SilentSolution 2 ปีที่แล้ว

    Thanks sir

  • @mihai6564
    @mihai6564 2 ปีที่แล้ว

    good video

  • @AnlUreturk
    @AnlUreturk 2 หลายเดือนก่อน

    Great

  • @liljaaccount5838
    @liljaaccount5838 2 ปีที่แล้ว

    super

  • @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

  • @shoak_lekahiak
    @shoak_lekahiak 3 ปีที่แล้ว

    subbed

  • @TheTacoExpress82
    @TheTacoExpress82 9 หลายเดือนก่อน

    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 2 ปีที่แล้ว

      @@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 2 ปีที่แล้ว

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

  • @FirstnameLastname-gy4bz
    @FirstnameLastname-gy4bz ปีที่แล้ว +1

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

    • @jserien08
      @jserien08 ปีที่แล้ว +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"

  • @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

  • @user-rz2jy2ve6q
    @user-rz2jy2ve6q 11 หลายเดือนก่อน

    a tutorial with not git repo address!??

  • @genericdeveloper3966
    @genericdeveloper3966 10 หลายเดือนก่อน

    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