0% found this document useful (0 votes)
11 views39 pages

DEVOPs Record

The document provides a step-by-step guide for creating a user registration form in HTML, installing Git and GitHub, and setting up Jenkins on Windows. It includes instructions for resolving common GitHub errors related to permissions and authentication, as well as integrating GitHub with Jenkins. The document also covers the installation of Java Development Kit (JDK) and the necessary configurations for successful Jenkins setup.

Uploaded by

Manoj Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views39 pages

DEVOPs Record

The document provides a step-by-step guide for creating a user registration form in HTML, installing Git and GitHub, and setting up Jenkins on Windows. It includes instructions for resolving common GitHub errors related to permissions and authentication, as well as integrating GitHub with Jenkins. The document also covers the installation of Java Development Kit (JDK) and the necessary configurations for successful Jenkins setup.

Uploaded by

Manoj Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

1.

Write code for a simple user registration form for an event

<html>
<head><title>registration form</title>
<style>
.reg_bt{
background-color: blue;

}
</style>
</head>

<body>
<div class="reg_form">
<label for="First_name ">First Name</label>
<input type="text" name="First_name" > <br><br><br><br>
<label for="Last_name ">Last Name</label>
<input type="text" name="Last_name"> <br><br>
<label for="Email_Id ">Email Id</label>
<input type="text" name="Email_Id"> <br><br>
<label for="Password ">Password</label>
<input type="text" name="Password"> <br><br>
<input type="button" onclick="register" value="Register"
style="width: 100px;" class="reg_bt">
<label for="OTP">OTP</label>
<input type="text" name="OTP" id="OTP">

</div>
<script src="1.js"></script>
</body>
</html>
2. Explore Git and GitHub commands.

Git Installation

Now Install git from the link :https://git-scm.com/downloads

Then click on the download for windows button

Now select 32bit or 64bit standalone installer according to the system specification
(ex: for mu lapi its 64bit to check the you system bit’s right click on this and select properties
then you will redirect to a device specification their you can find it as system type / or / just press
search about the pc you can go there directly)
Now a file will be downloaded then click on it

Then you will get a popup for permission to install press yes follow the steps according to the
images
If you get this screen git is installed successfully.

Now enter cmd: git gui in git terminal to git gui


Git Commands: Working with Local repositories
Git Commands: Working with remote repositories
3. Practice the source code management on github. Experiment with the source code
written in exercise1.

Github account creation


Create Github account on https://github.com/

Now lets SignUp

Step 1: Enter you gmail or email in the signup email slot the click on signup
Now enter a strong password and enter the valid username the complete the verficati
Now you will be redirected to sign in page enter your login credentials

This is the home page of github repository


Do this if you get this error

The error indicates that you don’t have the necessary permissions to push changes to the
repository. The 403 error means GitHub is rejecting your request, often due to authentication or
permission issues. Here’s how to fix it:

Steps to Resolve

1. Check Your Authentication

● If you're using HTTPS for Git, ensure your credentials are correct.
● Try re-authenticating:
1. Clear stored credentials:
■ On Windows: Open the Credential Manager (Control Panel > User
Accounts > Credential Manager), look for any stored GitHub
credentials under "Windows Credentials," and remove them.

Retry the push command:


git push -u origin main
2.
■ Git will prompt for your username and personal access token (PAT).
Replace your password with a GitHub PAT, which you can generate from
your GitHub account:
■ Go to Settings > Developer settings > Personal access tokens
> Tokens (classic) and create a token with necessary
permissions.

2. Verify Repository Access

● Ensure you have push access to the repository:


○ Log in to your GitHub account and check the repository’s Settings >
Collaborators and Teams.
○ If you’re not listed as a collaborator or team member, ask the repository owner to
grant you push access.

3. Use SSH Instead of HTTPS

● If you have set up an SSH key, you can switch from HTTPS to SSH to avoid
authentication issues:
1. Add your SSH key to GitHub:
■ Follow GitHub's guide to add your SSH key.

Change the remote URL:


git remote set-url origin git@github.com:vrecgit/sample3.git
Push your changes:
git push -u origin main

4. Double-Check Repository URL


Confirm that the remote URL is correct for the repository:
git remote -v

○ The URL should match the repository on GitHub.

Common Scenarios

● Incorrect Username: Make sure you're using the correct GitHub username (AMK1914
may not have permissions for vrecgit/sample3).
● Read-Only Access: If you're trying to push to a repository where you only have read
access, request write access or fork the repository to your account and push there.

Let me know which step worked or if you need further assistance!


4. Jenkins installation and setup, explore the environment

Jenkins installation on windows

Step1 : go to C drive open program file then open java folder then check there folder name JDK
21 or JDK 17 if not follow this steps

Step 1.1: go to the Browser then search JDK 21 (or 17) download 64 bit

Press on java download-oracle then scroll down then select JDK 21 and windows
options then choose X64 installer
Now install it as show in the images
Now open cmd and enter command: java –version if get this the java is installed successfully

Now open browser enter this link: https://www.jenkins.io/download/ now scroll down to the
download jenkins section then select windows option then installer will be downloaded

Now open the downloaded installer and follow the steps


Now go to this link: http://localhost:8080/ if get this screen Jenkins is installed successfully
Now to get this password follow the folder path shown in the red color just copy that address
Then open your this pc and past it in the folder path section as shown in the img then press
enter

C:\ProgramData\Jenkins\.jenkins\secrets\initialAdminPassword
Now it will show text editor options to open the file open it
the note pad

Now you will get the password copy that and paste it in the
administration password in jenkins then press continue
Now select the install suggested plugins option

As this installation completed you will redirected to the user


creation panel where create your new user
Enter the detail and save and continue the save and finish
Jenkins setup is Successfully

Now click New item


Enter the name and select freestyle project option and press ok

Now fill the description and select github project option and
paste the url copied from github remote repository click apply
Copy the above url and paste it in the project url
Note the branch name should be according to the github my
computer default has main sa make it main

Now press apply and save then press build now


Successfully integrated github with jenkins

You might also like