Use sourcetree to clone url from azureDevOps - atlassian-sourcetree

I want to use sourcetree to clone from azureDevOps
azureDevOps
I click copy clone URL to clipboard
Sourcetree
New => Clone from URL
and Paste https://xxxxx.visualstudio.com/xxxxx/_git/XXXXX (from my copy)
it say This is not a valid source path/URL
Details
abort: 'https://xxxxx.visualstudio.com/xxxxx/_git/XXXXX' does not appear to be an hg repository:
svn: E170013: Unable to connect to a repository at URL 'https://xxxxx.visualstudio.com/xxxxx/_git/xxxxxx'
svn: E230001: Server SSL certificate verification failed: issuer is not trusted
if I want to login accounts (use sourcetree accounts)
Host Azure DevOps https://xxxxxx.visualstudio.com/
login error
couldn't connect
Check my username and password
but I can login and logout Azure DevOps with my username and password
so I don't know why login error

The valid link to clone is
https://{Organization}#dev.azure.com/{Organization}/{Project}/_git/{RepoName}

Related

fatal: Authentication failed when pushing to bitbucket.org

Hi on a linux system and having a really difficult time pushing a few of my commits.
when I do git push I get this message which I then enter the password but I keep getting
git push
when I enter my password it cannot authenticate
fatal: Authentication failed
I have tried to modified my ./.git/config and entered
[credential]
name = xxx
email = xx
[user]
name = xxx
email = xx
both are the same
I also have other projects on the main github.com and that seems to work fine.
is there anything I can try?
there was a similar issue but it was on a windows box,
"Fatal: authentication failed" error when pushing to bitbucket repo
thanks.
First, user/email have nothing to do with remote Git hosting server authentication, and are only used for local commit authorship.
Second, make sure you are using HTTPS URL (which can indeed request for credentials -- username / password or username / token), not SSH (which could require entering a passphrase to decrypt the private SSH key)
cd /path/to/repository
git remote -v
Third, for HTTPS, try a HTTPS access token instead of your actual account password.

Creating ssh key in github

I have a question regarding managing two Github accounts in my machine (office and personal). Whenever I create a repo in personal am I supposed to create a new ssh key(As my office git account username and email are global)? Using windows credentials way I'm prompted to enter the username and password for the first time I do remote push then onwards I need not have to do that for that particular repo. I wanted to try by ssh(to avoid entering my git account credentials for the first time) or can I stick with the windows credential manager way?
Whenever I create a repo in personal am I supposed to create a new ssh key(As my office git account username and email are global)?
No: the SSH key remains the same and is used to authenticate you to your personal GitHub account.
You only need to register that key in your ~/.ssh/config file:
Host perso
Hostname github.com
User git
IdentityFile ~/.ssh/myPersoKey
Then, in your local cloned repository:
cd /path/to/local/clone
git remote set-url origin perso:<me>/<myrepo>
Then a git push will use the SSH URL, with the right perso key.

How to fix issue when using github add, commit and then push?

I initialized a repo in my GitHub. I issued a git clone command. I went to the directory in my local computer where I wanted to clone the repo. Then I copied some files in my local drive. Then I did:
git add .
git commit
git push -u origin master
The message appeared:
remote: Permission to jasonkid1/testuli.git denied to jpamittan.
fatal: unable to access
'https://jasonkid1#github.com/jasonkid1/testuli.git/': The requested
URL returned error: 403
How can I fix this?
For any https authentication issue, you need to check your credential caching:
git config credential.helper
That is:
On Windows, for instance, you would need to open the Windows Credential Manager and check the right password was entered.
On Mac, you would need to update the OSX keychain.
You might have credentials for any github.com URL associated to jpamittan (wrong user) instead of jasonkid1.

bitbucket git push not permitted

i am trying to push code to bitbucket account from eclipse, where i am getting error *"push not permitted"*, i am able to clone and get files from the bitbucket repository.
i am facing problem while pushing to upstream command in eclipse git, am getting below error
git#bitbucket.org:codedevelopers/coder.git push not permitted
i am not admin, but i have read and write access granted by my admin, i have tried both ssh and https push, i am getting same error. i am stuck with this issue. i have another user who is admin ,can able to push his code to bitbucket.
Thanks for your replies
Ssh would work if your public key was added to the repo admin ssh key management page.
https should work if you are using your bitbucket username and email, provided the admin did grant you access using that exact email
So try:
git remote set-url origin https://myusername#bitbucket.org/codedevelopers/coder
(replace myusername by your BitBucket account username)
See "Grant users and groups access"
Double-check with that admin which email he/she used to grant you write access to this repo.
A mentioned by jszakmeister in the comments, look out for a typo in the url you end up using.
For instance, there is a user bitbucket.org/codedevelopr (instead of 'codedevelopers').

problem in pushing to github

I have created a repository on github named pygame. Created a clone and added files and commited.but when I attempt to push I receive the following error:
git push -u origin master
error: The requested URL returned error: 403 while accessing https://github.com/amalapk/pygame/info/refs
fatal: HTTP request failed
I can ssh to git#github.com and receive the notice that I logged in successfully, but can't push to my repository.
I recently experienced this problem when setting up a new clone of my github project.
You need to include your username in the URL to your project, in the form
https://user#github.com/project/...
For example, the URL provided for my test github is this:
https://github.com/jdblair/test.git
If I add my username to it, like this, then I'm able to push and pull from github with no problem:
https://jdblair#github.com/jdblair/test.git
It is easiest to use the URL that contains the username starting from when you clone a project.
You can change the URL for an existing project like this:
git remote set-url origin https://user#github.com/project/foo/bar.git
You can use the ssh authentication instead if you want, but that's a separate setup process.
Github now is asking us to use git 1.7.10 or later:
https://help.github.com/articles/error-the-requested-url-returned-error-403
The GitHub Remote page mentions the read/write addresses for a repo:
Make sure your clone address is like:
https://github.com/username/yourRepo.git
And that you have defined:
git config --global user.name "Firstname Lastname"
git config --global user.email "your_email#youremail.com"
Should you use a git address (without ssh), you would also need:
git config --global github.user username
git config --global github.token 0123456789yourf0123456789token # no longer needed
(with your token coming from “Account Settings” > Click “Account Admin.”)
Update 2013: you still can generate a token (see "Creating an access token for command-line use"), but you would use it as a password for https url.
Actually, if you activate the 2FA (two-factor authentication) mechanism on GitHub, you will need a token for your https url (because your regular password would trigger the second-step verification).
See "Configure Git clients, like GitHub for Windows, to not ask for authentication"
See more at "Which remote URL should I use?".
It's all in the remote.
Change your current remote from https://github.com/amalapk/pygame.git to git#github.com:amalapk/pygame.git and enjoy.
To do this... (assuming your current remote is called origin)
git remote set-url origin git#github.com:amalapk/pygame.git
In my case getting rid of such error message was resolved this way:
Person was simply added to github repository as a colaborator.
Thats it - error vanished magically.
Committing to github from server this is what worked for me in the terminal or git bash
To create a remote to github.com try:
git remote add origin https://put your username here#github.com/put your git username here/put your repository name here
To change the remote just do:
git remote set-url origin https://put your username here#github.com/put your git username here/the name of your repository here
Please follow the instructions on http://help.github.com/create-a-repo/
You have cloned your repository with the public read only url.
RTFM