What are the steps to configure a Jenkins CI server for executing automated BDD selenium tests with a remote webdriver?

Just diving into the world of Jenkins and currently attempting to configure a server to execute selenium tests from a GitHub repository. Something seems off in my setup, but despite multiple attempts, I can't seem to pinpoint the issue.

I have set up the selenium plugin to utilize the default Selenium hub port 4444.

Project GitHub Configuration

Struggling to understand why this error keeps popping up. The login credentials match the username and ssh key that were generated. Strangely enough, I'm able to access the repo by clicking on GitHub within the project dashboard.

Project Shell Execution Steps

This outlines the before-build execution steps. Essentially, the commands used in the terminal to run the tests locally.

Upon job initialization, the following log is produced:

 Started by <user>
 Building in workspace /Users/Shared/Jenkins/Home/workspace/Tutorial
 > git rev-parse --is-inside-work-tree # timeout=10
 Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/<repo address>.git # timeout=10
 Fetching upstream changes from https://github.com/<repo address>.git
 > git --version # timeout=10
 using GIT_SSH to set credentials 
 > git fetch --tags --progress https://github.com/<repo address>.git +refs/heads/*:refs/remotes/origin/*
 ERROR: Error fetching remote repo 'origin'
 hudson.plugins.git.GitException: Failed to fetch from https://github.com/<repo address>.git
 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:809)
 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1076)
 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1107)
 at hudson.scm.SCM.checkout(SCM.java:496)
 at hudson.model.AbstractProject.checkout(AbstractProject.java:1281)
 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
 at hudson.model.Run.execute(Run.java:1728)
 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
 at hudson.model.ResourceController.execute(ResourceController.java:98)
 at hudson.model.Executor.run(Executor.java:405)
 Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://github.com/<repo address>.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
 stdout: 
 stderr: remote: Invalid username or password.
 fatal: Authentication failed for 'https://github.com/<repo address>.git/'

 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1877)
 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1596)
 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:807)
 ... 11 more
 ERROR: null
 Finished: FAILURE

Answer №1

If you're utilizing an SSH key for Jenkins authentication, consider using SSH as the version (e.g.

<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a6c1cfd2e6c1cfd2ced3c488c5c9cb">[email protected]</a>:FOO/BAR.git
) rather than HTTPS.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What could be the reason for a Python library functioning properly when executed from the desktop, but failing to run when invoked from

My web app was running smoothly until I decided to install the jsonpickle library, which caused a problem when calling Python code from PHP. The library functions as expected in the python shell, converting nested structures to JSON data that is too comple ...

Locating Elements Proportionately using XPath

I'm currently working on developing a function that locates the parent element of a specified element using XPath. However, I'm facing some challenges as to why this implementation is not functioning properly. protected WebElement findParent(Web ...

Instructions for selecting specific areas of an image with bounding box coordinates

I am currently working with grayscale images that contain multiple regions of interest specified by rectangular bounding boxes. All the coordinates for these bounding boxes are saved in a CSV file. My goal is to isolate these regions of interest by multipl ...

Is it possible for a UnreachableBrowserException exception to be triggered by conflicting network configurations?

My setup involves two grids: I have a local grid setup where the hub and nodes run on my local machine, connected to network#1 Additionally, I have a VM grid setup where the hub and nodes are running in a virtual machine, connected to network#2 When ...

Having trouble connecting to the standalone-chrome selenium server through the Kubernetes service

I am currently working with a k0s Kubernetes cluster running on a single node. My goal is to set up a selenium/standalone-chrome to create a remote Selenium node. I've encountered an issue where I can successfully access it by port forwarding 4444 fro ...

Fixing issues with Selenium and Chromedriver on AWS Lambda (unable to access chrome)

I have successfully deployed a Lambda Function for headless chrome with Python Selenium using the Serverless framework. However, while the function runs fine locally, it crashes on Lambda. Key details: (Driver info: chromedriver=2.41.578700 (2f1ed5f9343c1 ...

Discovering xpath in Chrome Version 58.0.3029.81 (64-bit) can be done effortlessly with the help of xpathfinder. Unfortunately, the shortcut shift+ctrl+x

Having trouble locating the xpath in Google Chrome Version 58.0.3029.81 (64-bit) using xpathfinder. The shortcut shift+ctrl+x is not working for this. This xpath would be used with selenium 3.3.1 for automation testing. Your assistance is greatly appreci ...

There is a SyntaxError present in the code snippet: "ALPHANUM_KEY = lambda s: [int(g) if g.isdigit() else g for g in RE_DIGIT.split(s)]"

I found this Python script on a website about converting amber trajectory files to Gromacs xtc format. #!/usr/bin/python #Workflow based on Trajectory Converter - v1.5 by: Justin Lemkul #completely reimplemented and improved by Peter Schmidtke & Jes ...

Comparing robust web clients to streamlined web clients

I'm faced with a design decision. For my web (ajax) application, we're debating where to place the user interface logic. One option is to have it completely loaded via javascript (pure single page), with only data coming and going. Alternative ...

Exploring the Power of Functions in Python 3

Within my code, there are four functions that function in the following manner: def function_four(): # Implements logic function_one() def function_three(): # Implements logic function_two() def function_one(): usr_input = input("Op ...

Unable to select a radio button within a fieldset

Currently, I am facing an issue while trying to automate a process using Python with Selenium. The problem arises when attempting to click on a radio button. Here is the scenario: https://i.stack.imgur.com/iM7aE.png Here is the code snippet: <div clas ...

Python Selenium encountering a Stale Element Problem

I'm working on a project to track the number of times the "Load More Reviews" option is clicked on this particular website. However, I encountered the following error: selenium.common.exceptions.StaleElementReferenceException: Message: stale element ...

Extracting Information with BeautifulSoup for every individual subpage - lengthy and varied URL structure

My current project involves scraping NFL passing data from the years 1971 to 2019. I was successful in extracting data from the first page of each year using the following code: # Here is the code that works: passingData = [] # initializing an empty list ...

Include the timestamp of the present moment and update the JSON data structure using Python

After successfully scraping news portal data and storing it in a DataFrame, I exported the data to both csv and json formats. The export to csv went smoothly, and there were technically no issues when exporting it to json as well. Below is the sample resul ...

Extracting JavaScript OnClick button using Selenium

I'm having trouble extracting the email address from the following URL: https://www.iolproperty.co.za/view-property.jsp?PID=2000026825 that is only visible after clicking on the "Show email address" button. However, every time I attempt to click and r ...

Checking to ensure that a roster is arranged properly capybara

I am in the process of developing Capybara tests to ensure that a list of dates is sorted accurately. For instance, I have a list of dates including Wed 27 Jun 12, Mon 13 Aug 12, Thu 31 May 12, and upon clicking a button, the dates should be rearranged fro ...

Having trouble locating a div element by its class name using Selenium in Python

Struggling to access the "events" section within the div labeled "rps-wrapper" on the webpage http://gridworlds-multiplayer.org/, encountering an error when using a function. <div class="rps-wrapper"> <ul id="events"></ul> ...

Tips on ensuring the text value is completely loaded in Selenium before proceeding with the next automation step

When experimenting with Selenium, I attempted the code snippet below to extract row values. public static void main(String[] args) throws InterruptedException { WebDriverManager.chromedriver().setup(); ChromeDriver driver = new ChromeDriver(); ...

Transforming a double summation with j less than i+1 into vector form

Currently, I am tasked with computing a double sum by using a nested loop structure: k = 3 sumterm = 0.0 for i in range(k): for j in range(i+1): sumterm = i+2*j My objective is to vectorize this summation process. However, the challenge lies ...

The resize() function in Scikit image raised an error due to an unexpected argument 'anti_aliasing' being passed

I attempted to utilize the resize function with aliasing as outlined in the documentation at from skimage.transform import resize im_test = resize(im_test, (im_test.shape[0] / 3, im_test.shape[1] / 3),anti_aliasing=True) However, this resulted in the fo ...