Git error→Support for password authentication was removed on August 13, 2021.
here we follow a token method to upload a code on github
- Log in to github account
- Go to your account setting
- go to developer setting in left bottom sidebar
4. click on personal access tokens → classic
5. generate new token select classic
6. write any thing in note section and tick the repo button to allow access of all the repositary in your github account by using this token or tick on all option if you are giving authentication to jenkins
Now click on generate token and copy the token
go to your terminal select the folder you want to push to your github and run following commands
- git add .
- git commit -m “push by using token”
git remote set-url origin https://username:your-token@github.com/username/repository.git
#username==your github username
#your-token == paste the token you copied above
#repository==name the repository where you want to push your code
4. git push --set-upstream origin main