Jenkins-Git username / password credentials binding

สำหรับ Blog ถ้าใช้ Jenkins แล้วอยาก Binding Git โดยใช้ username / password อยู่ใน pipeline มีวิธีการตามนี้ครับ ถ้าใช้ตัวอย่าง PowerShell / Shell ผมมี recap ตัวอย่างให้ลองนำไปปรับใช้กันครับ สุดท้ายสำหรับวิธีการนี้ แนะนำให้ใช้กับ Git ที่ยังต่อ username / password อยู่นะครับ ถ้าเป็นตัวใหม่ๆใช้ AccessToken / PAT หรือ การแลก Key จะ Secure กว่าคร้บ Reference