Unable to create 'new job' in jenkins, OK button greyed out - jenkins

I am trying to create a new job in Jenkins. Even after giving 'item name' and type of project as 'freestyle', the 'OK' button is greyed out as shown in the attached screenshot.
I am using :
Windows 7 32 bit OS
Jenkins version 1.619
Can anyone tell how to solve this issue.
Thanks in advance.

Check if the problem is related to your particular browser configuration.
Try with addons/plugins disabled, or in another browser.
Check the Jenkins logs under the logs folder to see if there's anything meaningful.

As the "People" tab in Jenkins says, it "Includes all known “users”, including login identities which the current security realm can enumerate, as well as people mentioned in commit messages in recorded changelogs."
To ensure that you have been assigned with appropriate role, ask a person with admin or dev rights, to go to Manage Jenkins -> Manage and Assign Roles -> Assign Roles, and then add you as user with appropriate rights.

Easy way to fix this issue
Before :
The OK button is disabled:
After :
Choosing any items and then OK will enable:

Related

How to solve Dashboard showing "[user] is missing the Overall/Administer permission" after jenkins.war upgrade to 2.263.3

I was about to ask this question - but have managed to find a solution.
Adding question anyway in the hope that it might help others.
AND because I was initially scared to do anything with wizard in case jenkins config got wiped .. or something. So despite seeing the wizard I went all around the houses moving config files, editing different settings before finally finding the very easy solution!
Upgrade from jenkins.war 2.263.3 to 2.375.1 gave some trouble.
Jenkins with workflow and pipelines.
PROBLEM:
Dashboard shows "[user] is missing the Overall/Administer permission"
You can actually use menus and see jobs to some extent but various parts of GUI are not working.
SOLUTION:
Try to login as admin user.
Instead of Dashboard showing the jenkins setup wizard was showing.
Click in the wizard to skip setup and get rid of it.
After that Dashboard shows ok for the admin user and also for other users.
Another thing to watch with this jump upgrade - ssl library has changed and jenkins internal .ssh/config had to have some changes to control legacy ssh keys.
Login as admin user.
Instead of Dashboard showing the jenkins setup wizard was showing.
SOLUTION:
Click in the wizard to skip setup and get rid of it.
After that Dashboard shows ok for the admin user and also for other users.

Jenkins - getting "No type prefix:" when assigning roles

I am trying to assign roles to users in Jenkins using the 'role based strategy' plugin. When I do that, I am getting a red text that says "No type prefix:" in front of every user that I am assigning a role to. Please advise how this can be removed.:
I am very new to Jenkins so any suggestions will be very helpful.
Regards
Ramesh
use "USER:" for user and "GROUP:" for group .. eg "USER:ABC" ..this changed with the recent plug in update ..
In order to resolve we have to add twice.
In your example
Under Global roles
Enter only jenkins and click on Add and click on admin checkbox
Enter USER:jenkins and click on Add and click on admin checkbox
Apply
Save
Similarly for all other users which needs admin role can be mapped.
The same approach can be used under Item and Node roles if it is configured
By doing this we would still see > No type prefix: jenkins however role based permission would work in desired way.
If you are locked out then use following link to get access again-
https://www.jenkins.io/doc/book/security/access-control/disable/
and follow above steps.
Just update plugins:
Matrix Authorization Strategy Plugin
Role-based Authorization Strategy

No build icon next to the build job list in jenkins

I have a problem with one of my coworkers is not able to see the build icon next to each job. I already tried to make the permissions in Manage Jenkins -> Configure Settings -> Project-based Matrix Authorization Strategy to be the same as mine but I can see the icon and my coworker can't, so any help would be appreciated.
I'm attaching a picture so everyone knows what I'm talking about. It's the red square box that my co-worker is not able to see.
Ensure that your colleague has the Job->Build permission for those jobs, log out, clear cache in browser for jenkins, log in. It's possible their browser has an old version of the page cached or their client hasn't responded to a permissions change yet?

How to work with two different BitBucket accounts in SourceTree

I have two different bitbucket accounts set up. One is for work projects and one is for personal use. In BitBucket I have set up a repository in each of the accounts for different projects.
In SourceTree I have a few existing personal projects that are syncing up to my personal repository on SourceTree. In the left hand panel I can see my "Develop" branch for one of those personal projects and on the remote in BitBucket I can see the remote repo.
In SourceTree I don't see an obvious way to keep my two accounts separate. For example, I have added the work repo in SourceTree but when I try to commit an initial version of a work project it only gives me the option to commit my personal project branch.
How can I now add my work repo locally and sync only those work projects into repos on that work BitBucket account?
For SourceTree 2.0.2+ on Mac only with GitHub accounts:
Click from menu File-> New/Clone
In the dialog click settings icon.
In the resulting popup menu click Settings
It brings a dialog with listing user accounts. Add your additional account to the list.
Close the dialog.
Click remote button (next to local) on the tool in image shown below.
All your added accounts will be listed and their respective repositories with button to clone.
Hope this helps.
NOW on Windows, you do it in the Clone/Add/Create Repository dialog:
Click the "Hosted Repositories" button (internet icon)
Click "Edit Accounts"
Click "Add"
Well I have done this way:
Click on Settings
Click on Advance tab
Enter your Full name and Email address (Email should be match with your Bitbucket account)
Click on OK
Click on Close (To close current window)
Restart again
Note: You must have added account in Source tree. (Open Source tree -> Click on Setting icon < Right Top corner> -> Click Settings -> Add your Account -> Set as Default account)
Hope this would help you.
In Windows, you can do it by following steps:
Click on settings button ( right top corner). It will open dialog box.
Click on Advanced tab.
Uncheck the "Use global user settings".
Now you can enter username and email id for corresponding repository.
Click on OK to save changes.
If I understand your question correctly, you still need to do a little bit more set of your bitBucket accounts.
You can also test the BitBucket server to see which account you are logging in with.
ssh -v git#bitbucket.org
This link help me, follow these instructions here and you should be successful.
The key part you need is in you .git/config.
You'll need separate entries for each.
Use different SSH keys for different accounts on the same Git hosting
In Windows you may have more than one account (you can have even GitHub and BitBucket side by side). For example, assuming the account you have now in SourceTree is with BitBucket and you want to add your GitHub account to it as well, do the following:
From menu, choose File->New/Clone
In the Source Path/URL put the repository url for a repository you have on github
Wait for a few seconds and it asks you for username/password. (first, buttons might be disabled for example for entering your password. So wait for a few seconds first)
Add the new username and passowrd on github.
Now if you like you can cancel the clone.
For BitBucket account/repos, you can include the username you want to use as part of the git URL. SourceTree will then ask for the password for that username.
https://username#bitbucket.org/account/repo
If you've already cloned a repository with ssh on the Mac version, and you want to change the account for it, you can do this by changing the host name of the remote.
If you've let SourceTree modify your ˜/.ssh/config , then it will have added some entries starting with:
# --- Sourcetree Generated ---
Host <account name>-<service name>
...
Choose the <account name>-<service name> combination that you want to use and modify the path of your repository (in Remote Settings). Your new path will be something like the following format:
git#<account name>-<service name>:<account name>/<repository name>.git
(Actually, you can use this solution for working copies not cloned by SourceTree too.)
on windows the tool has a bug
no matter what I've tried from within the tool it was always using a previews git account which was cached somewhere...
so I searched all files where sourcetree was installed and I found a file C:\Users\WIDNOWS_USER\AppData\Local\Atlassian\SourceTree\userhosts
there I had cached the old git user/account name and it was driving me nuts in the app.
I updated this file, deleted the old account name and added the new one, restarted the tool and it started to work fine.
there's also a file
C:\Users\WIDNOWS_USER\AppData\Local\Atlassian\SourceTree\passwd
check that one too and if your cached account with passwd is there too clean it out, do not add here anything, the app will do it first time when you enter your password for the new acccount

Rename a job in jenkins

How to go about renaming a job in jenkins?
Is there another way than to create a new job and destroying the old one?
In Jenkins v2, in your dashboard or job overview, click right button on the job and select rename:
In the version we're running (1.480) it is simply a matter of changing the Project name in the Configure menu and hitting Save afterwards.
Cheers,
In New Jenkins, Click Rename link present in the left navigation pane, Update the job name and click save.
Simply change the name in the Pipeline/Project name and hit save.
Note that if your browser window isn't wide enough the "popup" below will be offscreen so make sure you scroll down or your jobs may mysteriously not rename.
"Are you sure about renaming old-job to new-job?"
Use the "Configure" option to the left:
Example showing Configure option
(Sorry, first few posts so I'm not able to post images in directly yet!)
If you can't see this then make sure you have access rights - in other words, you may need to be logged in, and you will need privileges that allow you to administer that job/pipeline.

Resources