Github controls in UFT directly to do checkin and checkout - hp-uft

i wanted to know how we can do version controlling directly from UFT with gitHUB,
how to get GitHub controls visible on UFT 14.1 version tool?
Thanks
Raju

Copied directly from UFT 14.01 help documents:
Set up UFT to work with GIT
Before using GIT inside UFT you must configure GIT locally:
Install the GIT or SVN client on the computer running UFT.
Set up your GIT workspace on your computer. For details on see your GIT documentation.
In UFT, create the test and save it in the folder configured to work with GIT or SVN.
Add the document to your repository in GIT or SVN using the standard GIT and SVN commands.
When prompted, enter your user credentials:
GIT
You are prompted for your user credentials the first time you push to the remote repository.
Note:
If you need to clear your user credentials, select Tools > Clear All Credentials. Your user credentials for the SVN or GIT repository are removed and you will be prompted to enter them on the next update or commit.
After you set up the workspace and add a document to the workspace, the relevant icons are displayed in your testing documents in the Solution Explorer and you can use GIT commands for your documents directly from the Solution Explorer.
Check this link for more detailed information.

Related

How to update a GitHub access token via command line

I use the git integration with VSCode and got the notification today that I need to renew my access token. I did so and have my new token (which I obtained through the web interface). Now I need to set my local git configuration to use the new token instead of the old one which will expire in a few days.
The VSCode docs suggest the following:
To execute the 'GitHub: Set Personal Access Token' type Ctrl+Shift+p in VSCode to open the command palette and type 'GitHub: Set Personal Access Token'. You will then be prompted to enter the token generated from GitHub.
This option isn't available in my git integration in VS code (maybe I need an update?)
How can I do this from the command line?
If you want to update Github Personal Access Token in VSCode, you need to install Github Extension
You can also update Github Personal Access Token via command line
Open a command line and set the current directory to your project root
Run the command to set remote access via a token
git remote set-url origin https://username:token#github.com/username/repository.git
Example:
git remote set-url origin https://exampleuser:b8c28127***63gu56b2d#github.com/exampleuser/exampleproject.git
Not sure if you are running on windows, but modern git binaries are using windows credential manager to store the GitHub / Git authentication details. To modify them, go to the windows "credential manager". The procedure is detailed here: https://www.sqlservercentral.com/blogs/changing-git-credentials-in-windows

How see which github repository is connected to heroku app?

How can you see the code for an app, or link to its github repository if all you have is the app's name (i.e. url)?
The reason for asking is I have a few apps and I'm not sure which repositories they link to (some are very similar - if I can inspect the codebases, I can be sure which one's which)
Within the folder where the app is stored, there is a hidden folder called .git. Note the unusual leading dot; it's really there. Given that, and assuming that you have the command line Git client installed on your machine, do the following.
Open the Windows Explorer.
On Options dialog, ensure that the option to show hidden files is enabled.
Navigate to the folder that contains the app in question.
Open a command prompt in that window. The easiest way to do that is to click in the address box, and overtype the folder path with the word "cmd."
In the command prompt window that opens, enter git remote show origin.
The foregoing produces a report that looks like the following.
F:\Source_Code\Visual_Studio\Projects\_Laboratory\JSON_Jam 2019/05/25 14:38:27.98>git remote show origin
* remote origin
Fetch URL: https://github.com/txwizard/JSON_Jam.git
Push URL: https://github.com/txwizard/JSON_Jam.git
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (up to date)
F:\Source_Code\Visual_Studio\Projects\_Laboratory\JSON_Jam 2019/05/25 14:38:32.21>
The Fetch URL and Push URL, which are usually the same, contain the information that you need, which will look something like https://github.com/txwizard/JSON_Jam.git.
In the above URL, txwizard is my GitHub login ID, and JSON_Jam is the repository name.
If Windows doesn't recognize the command, you may need to install Git for Windows. When you run the installation program, tell it that you want the command line tools, and that you want it integrated with the native command processor, cmd.exe.
In command prompt window navigate to directory where your project is located and enter git remote -v

Git operation during TFS build: "fatal: could not read Password" (wincred used)

We have an in-house TFS 2013 update 4 on Windows Server 2008 R2 Standard (TFS server), with Git version 2.5.0.windows.1.
Our TFS build process uses InvokeProcess activity to call Git from a batch file.
These are the calls to git we make from the batch file (in two lines for debugging purposes):
call git submodule init
call git submodule update
It is the second line that is giving me a problem, as shown below:
When I run the same batch file on the server manually (even from non-admin cmd.exe), all executes as expected, i.e. I am not prompted for any usernames or passwords.
We are currently using wincred as our credentials helper, having tried:
winstore,
git-credential-store,
adding generic windows credentials via Credentials Manager (tried both git:http://xxxxxx:8080 and just http://xxxxxx:8080).
setting credentials in .gitconfig globally and per repo.
Interestingly, Microsoft.TeamFoundation.Build.Activities.Git.GitPull has no problems cloning the superproject, but if I was to prompt Git to clone and pull via a batch file, I am getting the same "fatal: could not read Password" error.
Unfortunately, we do not have an option of upgrading to TFS 2015, where loading submodules is apparently a matter of ticking a check-box. Including username and password as part of the command in plain text is not an option either.
What do I need to try/do to allow Git to read the required Password using wincred?
All thoughts and suggestions will be much appreciated...
The main problem was the fact that our TFS Build service was running under NETWORK SERVICE account, as opposed to the account which I was entering passwords for.
Steps that I took towards the solution (as alternative to using TFS Admin Console):
On TFS Server, go into Services (services.msc), and locate "Visual Studio Team Foundation Build Service Host 2013" service among "Services (local)".
Right-click on the service, and on "General" tab click "Stop"
On "Log On" tab, select "This account" and enter the details of the account you validated with wincred (it is assumed that this account exists under "Project Collection Build Service Accounts" and has all the required rights for your repos).
Take note of the email address as it is displayed after "Check names" has been clicked.
Click "Apply"
Back on the "General" tab, click "Start".
Do the same for "Visual Studio Team Foundation Background Job Agent" service (I did that for consistency with the build service).
A few more points worth checking:
In your user account directory on TFS Server, ensure that the email address you saw after "Check names" in step 4 matches the email address used in the 'email' field under [user] in .gitconfig.
Ensure you get prompted for credentials at some point by wincred (I did that by running "git config credential.helper store" first, then running "git config credential.helper wincred" (if you want to do "git config --global credential.helper store", followed by "git config --global credential.helper wincred", then you'll need to run your cmd.exe with elevated permissions).
In my case the correctly saved credentials looked like this (in Credential Manager, under "Generic Credentials") - notice the absence of a username:
Hope this helps somebody with the same issue!

Github Mac Permission Issue

I'm using the latest Github for Mac as a new Git user. When I try to sync a repo (that I first cloned, then created a new branch, commited changes, and then merged with master), I got the error:
Authentication Failed.
You may not have permission to access repo111. Check Preferences to make sure you’re still logged in.
I searched for similar questions, but the answer seemed to be add SSH keys to github, so I followed: https://help.github.com/articles/generating-ssh-keys.
When I do ssh -T git#github.com, I get:
Hi User111! You've successfully authenticated, but GitHub does not provide shell access.
I'm logged in as the correct user, and have rights to the repo, so I'm not sure why I'm not authenticated?
It could be that you entered a password incorrectly and it's stored in your keychain.
For my situation, I was using GitHub for Mac to work with a BitBucket repository. Long story short, I mistyped my BitBucket password and GitHub for Mac could not authenticate (because the password stored in my keychain was wrong).
Thanks to the helpful folks at GitHub, they quickly responded when I asked for help:
Open Keychain Access.app (in /Applications/Utilities) and search for "GitHub for Mac." There should be an entry like "GitHub for Mac — bitbucket.com". Delete that entry
Steps to fix if using GitHub for Mac to manage a BitBucket repo
If you see this:
… then you might have a BitBucket keychain/password problem.
Open Keychain Access.app (in /Applications/Utilities) and search for bitbucket:
Right-click on the entry and get info:
Click on "Access Control" to confirm that it's truly the GitHub for Mac BitBucket password/login keychain item:
Rather than deleting the keychain entry/item, I just edited my password:
You should now be able to use GitHub for Mac without authentication failures. :)
Had the same problem, but it was not a password problem, since other repositories worked just fine.
Finally compared .git/config with a working repository and found this:
This failed:
[remote "origin"]
url = github#github.com/path/to/repository
This worked:
[remote "origin"]
url = https://github.com/path/to/repository
Still have no idea how or why this changed.
I had to try some other stuff after the solutions above didn't work out for me.
Dont know why I got this issue, or why was fixed after:
deleting the existing keys:
.ssh/github-rsa
.ssh/github-rsa.pub
restarting GitHub Desktop, which automatically regens the keys
add new keys to repo host (bitbucket etc)
I had the same problem, then I followed this steps:
Login to BitBucket and go to the repository you want to use
Click the “Clone” button, and change the drop down option to HTTPS.
Copy the command that appears (something like: git clone https://username#bitbucket.org/team-name/repository-name.git)
Open terminal in your mac and navigate to wherever you want the theme files to be stored.
Paste the clone command in the terminal, press enter and then enter your password when requested.
In Github for Mac go to the repositories screen and click the + sign in the status bar.
Select Add Local Repository – and then select the repository of the folder you want to add.
Done
If you have created remote repository on GitHub and merged with local repository or project .
you can add that local repository to GitHub desktop app
than go to Repository > repository settings > Remote >
under remote You'll find primary remote repository (origin)
there's a ssh remote url delete that And
Go to your GitHub account.
Open Your Remote repository
click on Clone or Download
Copy the https URL
paste that in the GitHub desktop app
click on fetch in the Desktop GitHub App
It'll work Great :)
If your password is correct and you still see have this problem, chances are your .git/config file has some miss configuration.
In my case, it had a pushurl value under [remote "origin"] which was not needed (I was working on a cloned project).
Comment that line by adding a # before it and you are good to go :)
Also, if you get an error saying:
This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push
just delete that by doing
rm .git/hooks/pre-push
now you are all set. This happened to me also using github desktop app for mac, with a remote bitbucket repo.
hint: if you commit changes and refresh bitbucket to see the changes, those might not show, but navigate to the root of the project and then back to the file and you'll see the changes. Probably some cache issue but it can drive you mad if you don't know this hint.

Clone repository from github in xcode userid password error

Open xcode then click "Connect to a repository"
After entering the URL the button on the bottom changes to clone. FYI The repository is private and should require a github password and userid. Clone button is then clicked.
It asks where to save the file. I choose a location then it comes here:
Always trust github.com is chosen as suggested in another post. Click Continue then get the following:
At this point it has not asked me for my username or password at any time. Looking around here and on other sites it should ask for user id and password at this point but this is all I get.
How can I get to the screen asking me to enter my Github user id and password when cloning a private repository on github.com in xcode?
This is a glitch in xCode. You will have to install git and repair/prepare the repository from the git command line or another git tool then reopen the project in xCode and then it will be recognized.
xCode is great for git when it works but will break sometimes and need manual repair/tweaking of a repository outside of xCode. You should think of the git features of xCode as a great aid to using git but not a complete interface replacement.
You can try that way:
Open Terminal application.
cd to your project directory. (cd /your/project/directory)
Write git clone https/link/for/your/git.
Put password for the git user.
It will start download on your project directory.
It seems to work using the git#github.com:user/repo.git URL format if you have your public SSH key set up properly on your Mac (and the private key is not protected by a passphrase).
When xCode logs in via SSH to clone the repo, it will be able to do so without you having to provide any credentials. Note that this will probably only work where you have SSH (read/write) access to the repo in question. Since with Github you are likely to be forking another project and working on your own fork, this shouldn't be too much of an obstacle though.

Resources