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
  • Наука та технологія

КОМЕНТАРІ • 66

  • @Smaxey843
    @Smaxey843 Рік тому +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 3 місяці тому +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 3 місяці тому

      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 2 місяці тому

      "git push" by itself also worked for me

  • @manjubeli
    @manjubeli 3 роки тому +58

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

    • @TheEmperorXavier
      @TheEmperorXavier 2 місяці тому

      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_ Місяць тому

    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!

  • @albertovelazquez-ns7um
    @albertovelazquez-ns7um 28 днів тому

    Well, you are just great! You explain all the things we need to do a good practice and you do it in a really understandable way.

  • @rullywow3834
    @rullywow3834 3 роки тому +1

    Awesome content, well explained. Thanks, Jay!

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

    • @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 Рік тому +2

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

  • @mathewkargarzadeh3158
    @mathewkargarzadeh3158 3 роки тому

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

  • @parimalpatel7190
    @parimalpatel7190 4 роки тому +8

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

  • @MichaelRosas-kx8pi
    @MichaelRosas-kx8pi 3 місяці тому

    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 8 місяців тому

    Jay these tutorial are fantastic!

  • @Awas79
    @Awas79 Рік тому

    Awesome video

  • @asaf158
    @asaf158 3 роки тому

    Just love you m8,
    Amazing channel :-)

  • @Fekyi6
    @Fekyi6 Рік тому

    great video thanks

  • @stampeder1686
    @stampeder1686 11 місяців тому

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

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

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

  • @grahammccann8554
    @grahammccann8554 3 роки тому

    Thank you Jay :-)

  • @SilentSolution
    @SilentSolution 2 роки тому

    Thanks sir

  • @vnetpost
    @vnetpost 2 роки тому

    Thanks jay

  • @mihai6564
    @mihai6564 2 роки тому

    good video

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

  • @liljaaccount5838
    @liljaaccount5838 3 роки тому

    super

  • @AnlUreturk
    @AnlUreturk 3 місяці тому

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

    • @MurangShaBu_MahalNaBiGas
      @MurangShaBu_MahalNaBiGas 3 роки тому +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...

  • @shoak_lekahiak
    @shoak_lekahiak 3 роки тому

    subbed

  • @TheTacoExpress82
    @TheTacoExpress82 10 місяців тому

    nice Paw Patrol reference

  • @mikejetter145
    @mikejetter145 4 роки тому

    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 Рік тому

    a tutorial with not git repo address!??

  • @genericdeveloper3966
    @genericdeveloper3966 11 місяців тому

    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 3 роки тому

    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